This commit is contained in:
Louis Mazin 2025-07-01 15:32:04 +02:00
parent fede7cf8bc
commit d294004b56

View File

@ -6,7 +6,7 @@ const update = require('./displayer.js');
const clean = require('./cleaner.js'); const clean = require('./cleaner.js');
const { Client, GatewayIntentBits, Collection, Events } = require('discord.js'); const { Client, GatewayIntentBits, Collection, Events } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.GuildMembers,GatewayIntentBits.GuildMessages,GatewayIntentBits.GuildMessageReactions] }); const client = new Client({ intents: [GatewayIntentBits.GuildMembers,GatewayIntentBits.GuildMessages,GatewayIntentBits.GuildMessageReactions,GatewayIntentBits.MessageContent] });
const args = process.argv; const args = process.argv;
const token = args[2].toString(); const token = args[2].toString();
const pterodactyl = args[3].toString(); const pterodactyl = args[3].toString();
@ -74,8 +74,13 @@ client.on(Events.InteractionCreate, async interaction => {
}); });
client.on(Events.MessageReactionAdd, async (reaction, user) => { client.on(Events.MessageReactionAdd, async (reaction, user) => {
console.log('Réaction détectée:', reaction.emoji.name, 'par', user.username); // <- Ajout de ce log console.log('=== ÉVÉNEMENT REÇU ===');
if (user.bot) return; console.log('Emoji:', reaction.emoji.name);
console.log('Utilisateur:', user.username);
console.log('Bot?:', user.bot);
console.log('======================');
if (user.bot) return;
if (reaction.emoji.name !== '❓') return; if (reaction.emoji.name !== '❓') return;