fix
This commit is contained in:
parent
98c6a04f3e
commit
f0c6b15974
10
index.js
10
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user