diff --git a/indexTest.js b/indexTest.js new file mode 100644 index 0000000..ffea581 --- /dev/null +++ b/indexTest.js @@ -0,0 +1,27 @@ +import 'dotenv/config'; +import { Client, GatewayIntentBits, Options, Events } from 'discord.js'; + +console.log("--- DEBUG START ---"); + +const client = new Client({ + makeCache: Options.cacheWithLimits({ + MessageManager: 0, + }), + intents: [ + GatewayIntentBits.Guilds, + GatewayIntentBits.GuildMessages, + GatewayIntentBits.MessageContent, + ] +}); + +client.on(Events.ClientReady, async () => { + console.log('-----------------------------------'); + console.log(`[SUCCESS] Logged in as ${client.user?.tag}`); + console.log('--- BOT IS READY ---'); + console.log('-----------------------------------'); +}); + +console.log("Token status check: " + (process.env.DISCORD_TOKEN ? "Présent" : "ABSENT")); +console.log("Attempting login..."); + +client.login(process.env.DISCORD_TOKEN); \ No newline at end of file