We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9bacefb commit ab5c8d7Copy full SHA for ab5c8d7
src/modules/quoiFeur/quoiFeur.helpers.ts
@@ -68,6 +68,17 @@ export const reactOnEndWithQuoiUpdated = async (
68
newMessage: Message | PartialMessage,
69
) => {
70
if (!(newMessage instanceof Message)) return;
71
+
72
+ // Both E and U are in feur and coubeh, that should be sufficient to detect if the bot has already reacted
73
+ const feurCoubeh = new Set<string>([EMOJI.E, EMOJI.U]);
74
75
+ // Check if the old message already has a reaction
76
+ const selfReactions = newMessage.reactions.cache.some((reaction) => {
77
+ return reaction.me && reaction.emoji.name && feurCoubeh.has(reaction.emoji.name);
78
+ });
79
80
+ if (selfReactions) return;
81
82
await reactOnEndWithQuoi(newMessage);
83
};
84
0 commit comments