This commit is contained in:
Louis Mazin 2025-07-01 15:23:13 +02:00
parent f9a156818e
commit 848234c022

View File

@ -12,7 +12,7 @@ const token = args[2].toString();
const pterodactyl = args[3].toString();
const palworldToken = args[4].toString();
const deeplToken = args[5] ? args[5].toString() : null; // Ajoutez le token DeepL comme 5ème argument
console.log("deeplToken : "+deeplToken);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
@ -42,9 +42,9 @@ for (const folder of commandFolders) {
}
client.on('ready', () => {
console.log('Bot started !');
deploy(token);
client.user.setPresence({ activities: [{ name: 'des vidéos de Rygain.', type: 'WATCHING' }], status: 'online' });
client.user.setPresence({ activities: [{ name: 'Rygain', type: 'WATCHING' }], status: 'online' });
console.log('Bot started !');
});
client.on(Events.InteractionCreate, async interaction => {
@ -74,18 +74,19 @@ client.on(Events.InteractionCreate, async interaction => {
});
client.on(Events.MessageReactionAdd, async (reaction, user) => {
console.log("1");
// 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) {