Skip to content

Commit 9becab3

Browse files
committed
Try vibe-solving the issue
1 parent 0f5c9fe commit 9becab3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/handler/reaction/pollReactionHandler.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ export default {
4343
}
4444

4545
if (VOTE_EMOJIS.includes(reactionName)) {
46-
// this is a .vote poll -> TODO
46+
// this is a .vote poll -> remove other vote reactions from the user
47+
const messageReactions = message.reactions.cache;
48+
for (const [emojiName, reaction] of messageReactions) {
49+
if (VOTE_EMOJIS.includes(emojiName) && emojiName !== reactionName) {
50+
await reaction.users.remove(invoker.id);
51+
}
52+
}
4753
return;
4854
}
4955

0 commit comments

Comments
 (0)