mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
reaction_roles: don't act on own reactions
This commit is contained in:
parent
f3417313bc
commit
ef6162b522
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,11 @@ export const AddReactionRoleEvt = reactionRolesEvent({
|
||||||
const emoji = meta.args.emoji;
|
const emoji = meta.args.emoji;
|
||||||
const userId = meta.args.userID;
|
const userId = meta.args.userID;
|
||||||
|
|
||||||
|
if (userId === pluginData.client.user.id) {
|
||||||
|
// Don't act on own reactions
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure this message has reaction roles on it
|
// Make sure this message has reaction roles on it
|
||||||
const reactionRoles = await pluginData.state.reactionRoles.getForMessage(msg.id);
|
const reactionRoles = await pluginData.state.reactionRoles.getForMessage(msg.id);
|
||||||
if (reactionRoles.length === 0) return;
|
if (reactionRoles.length === 0) return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue