ReactionRoles: fix error when removing old reactions
This commit is contained in:
parent
49d3b4e21f
commit
497fdcc9f6
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ export class ReactionRolesPlugin extends Plugin {
|
||||||
for (const rolePair of toRemove) {
|
for (const rolePair of toRemove) {
|
||||||
await this.reactionRoles.removeFromMessage(targetMessage.id, rolePair[0]);
|
await this.reactionRoles.removeFromMessage(targetMessage.id, rolePair[0]);
|
||||||
|
|
||||||
for (const reaction of targetMessage.reactions.values()) {
|
for (const reaction of Object.values(targetMessage.reactions)) {
|
||||||
if (reaction.emoji.id === rolePair[0] || reaction.emoji.name === rolePair[0]) {
|
if (reaction.emoji.id === rolePair[0] || reaction.emoji.name === rolePair[0]) {
|
||||||
reaction.remove(this.bot.user.id);
|
reaction.remove(this.bot.user.id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue