diff --git a/.dist/message.js b/.dist/message.js index 3e43ef6..3afe6d3 100644 --- a/.dist/message.js +++ b/.dist/message.js @@ -511,7 +511,7 @@ class Message { } func(); } - makeReaction(data, member) { + reactionAdd(data, member) { for (const thing of this.reactions) { if (thing.emoji.name === data.name) { thing.count++; @@ -529,7 +529,7 @@ class Message { }); this.updateReactions(); } - removeReaction(data, id) { + reactionRemove(data, id) { console.log("test"); for (const i in this.reactions) { 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) { if (this.div) { console.error(`HTML for ${this.snowflake} already exists, aborting`);