compiled TS again
This commit is contained in:
parent
9269a08972
commit
8a6f437f4f
1 changed files with 16 additions and 2 deletions
|
@ -511,7 +511,7 @@ class Message {
|
||||||
}
|
}
|
||||||
func();
|
func();
|
||||||
}
|
}
|
||||||
makeReaction(data, member) {
|
reactionAdd(data, member) {
|
||||||
for (const thing of this.reactions) {
|
for (const thing of this.reactions) {
|
||||||
if (thing.emoji.name === data.name) {
|
if (thing.emoji.name === data.name) {
|
||||||
thing.count++;
|
thing.count++;
|
||||||
|
@ -529,7 +529,7 @@ class Message {
|
||||||
});
|
});
|
||||||
this.updateReactions();
|
this.updateReactions();
|
||||||
}
|
}
|
||||||
removeReaction(data, id) {
|
reactionRemove(data, id) {
|
||||||
console.log("test");
|
console.log("test");
|
||||||
for (const i in this.reactions) {
|
for (const i in this.reactions) {
|
||||||
const thing = this.reactions[i];
|
const thing = this.reactions[i];
|
||||||
|
@ -549,6 +549,20 @@ class Message {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
reactionRemoveAll() {
|
||||||
|
this.reactions = [];
|
||||||
|
this.updateReactions();
|
||||||
|
}
|
||||||
|
reactionRemoveEmoji(emoji) {
|
||||||
|
for (const i in this.reactions) {
|
||||||
|
const reaction = this.reactions[i];
|
||||||
|
if ((reaction.emoji.id && reaction.emoji.id == emoji.id) || (!reaction.emoji.id && reaction.emoji.name == emoji.name)) {
|
||||||
|
this.reactions.splice(i, 1);
|
||||||
|
this.updateReactions();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
buildhtml(premessage = undefined) {
|
buildhtml(premessage = undefined) {
|
||||||
if (this.div) {
|
if (this.div) {
|
||||||
console.error(`HTML for ${this.snowflake} already exists, aborting`);
|
console.error(`HTML for ${this.snowflake} already exists, aborting`);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue