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