require('dotenv').config(); const { Client, GatewayIntentBits } = require('discord.js'); const { loadCommands } = require('./src/handlers/commandHandler'); const { loadEvents } = require('./src/handlers/eventHandler'); const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers ] }); async function startBot() { try { console.log('🚀 DĂ©marrage du bot...'); // Charger les commandes et Ă©vĂ©nements await loadCommands(client); await loadEvents(client); // Connexion du bot await client.login(process.env.TOKEN); console.log('✅ Bot connectĂ© avec succĂšs !'); } catch (error) { console.error('❌ Erreur lors du dĂ©marrage du bot:', error); process.exit(1); } } startBot();