This commit is contained in:
Louis Mazin 2025-07-01 15:26:49 +02:00
parent 848234c022
commit 98c6a04f3e

View File

@ -42,9 +42,9 @@ for (const folder of commandFolders) {
}
client.on('ready', () => {
deploy(token);
client.user.setPresence({ activities: [{ name: 'Rygain', type: 'WATCHING' }], status: 'online' });
console.log('Bot started !');
deploy(token);
});
client.on(Events.InteractionCreate, async interaction => {
@ -73,20 +73,16 @@ client.on(Events.InteractionCreate, async interaction => {
}
});
client.on(Events.MessageReactionAdd, async (reaction, user) => {
console.log("1");
client.on(Events.MessageReactionAdd, async (reaction, user, details) => {
// Ignorer les réactions du bot lui-même
if (user.bot) return;
console.log("2");
// Vérifier si c'est l'emoji ❓
if (reaction.emoji.name !== '❓') return;
console.log("3");
// Vérifier si DeepL est configuré
if (!translator) {
console.log('DeepL token not provided, translation feature disabled');
return;
}
console.log("4");
try {
// Récupérer le message complet si nécessaire
if (reaction.partial) {