From 3d89bd8e6555071d99d7afdc8a534e0861732ee3 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sun, 4 Feb 2024 23:41:04 +0100 Subject: [PATCH] ignore own reactions --- events/reactionAdd.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/events/reactionAdd.js b/events/reactionAdd.js index 35fc162..c0b8de3 100644 --- a/events/reactionAdd.js +++ b/events/reactionAdd.js @@ -1,7 +1,10 @@ import { Events } from 'discord.js'; +import { config } from 'dotenv'; +config(); export const name = Events.MessageReactionAdd; export async function execute(reaction, user) { + if (user.id === process.env.CLIENT) return; const uname = user.username; const rname = reaction._emoji.name; console.debug(`[DEBUG] User '${uname}' reacted with emoji '${rname}'.`);