(premessage?: Message | undefined, dupe = false)
| 1719 | |
| 1720 | reaction.onclick = (_) => { |
| 1721 | this.reactionToggle(new Emoji(thing.emoji, this.guild)); |
| 1722 | }; |
| 1723 | } |
| 1724 | if (func) func(); |
| 1725 | } |
| 1726 | reactionAdd(data: {name: string; id?: string}, member: Member | {id: string}) { |
| 1727 | for (const thing of this.reactions) { |
| 1728 | if (thing.emoji.name === data.name || (thing.emoji.id === data.id && data.id)) { |
| 1729 | thing.count++; |
| 1730 | if (member.id === this.localuser.user.id) { |
| 1731 | thing.me = true; |
| 1732 | } |
| 1733 | this.updateReactions(); |
| 1734 | return; |
| 1735 | } |
| 1736 | } |
| 1737 | this.reactions.push({ |
| 1738 | count: 1, |
| 1739 | emoji: data, |
| 1740 | me: member.id === this.localuser.user.id, |
| 1741 | }); |
| 1742 | this.updateReactions(); |
| 1743 | } |
| 1744 | reactionRemove(data: {name: string; id?: string}, id: string) { |
| 1745 | for (const i in this.reactions) { |
no test coverage detected