27 lines
No EOL
783 B
JavaScript
27 lines
No EOL
783 B
JavaScript
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); |