From f0c6b15974f304bdee7d0c1804489f12ff111409 Mon Sep 17 00:00:00 2001 From: Louis Mazin Date: Tue, 1 Jul 2025 15:28:53 +0200 Subject: [PATCH] fix --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 3f31144..28131e6 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const update = require('./displayer.js'); const clean = require('./cleaner.js'); const { Client, GatewayIntentBits, Collection, Events } = require('discord.js'); -const client = new Client({ intents: [GatewayIntentBits.GuildMembers,GatewayIntentBits.GuildMessages] }); +const client = new Client({ intents: [GatewayIntentBits.GuildMembers,GatewayIntentBits.GuildMessages,GatewayIntentBits.GuildMessageReactions] }); const args = process.argv; const token = args[2].toString(); const pterodactyl = args[3].toString(); @@ -73,12 +73,12 @@ client.on(Events.InteractionCreate, async interaction => { } }); -client.on(Events.MessageReactionAdd, async (reaction, user, details) => { - // Ignorer les réactions du bot lui-même +client.on(Events.MessageReactionAdd, async (reaction, user) => { + if (user.bot) return; - // Vérifier si c'est l'emoji ❓ + if (reaction.emoji.name !== '❓') return; - // Vérifier si DeepL est configuré + if (!translator) { console.log('DeepL token not provided, translation feature disabled'); return;