completionId: cgen-1d70769f8a0d488d921283e8f049547d
cgen-1d70769f8a0d488d921283e8f049547d
This commit is contained in:
parent
cf34d592c3
commit
7ca2e74151
1 changed files with 10 additions and 0 deletions
|
|
@ -33,6 +33,16 @@ if (missingVars.length > 0) {
|
|||
process.exit(1);
|
||||
}
|
||||
|
||||
// Validate token format
|
||||
const token = process.env.DISCORD_BOT_TOKEN;
|
||||
if (!token || token.length < 20) {
|
||||
console.error("❌ FATAL ERROR: DISCORD_BOT_TOKEN is empty or invalid");
|
||||
console.error(` Length: ${token ? token.length : 0}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log("[Token] Bot token loaded (length: " + token.length + " chars)");
|
||||
|
||||
// Initialize Discord client
|
||||
const client = new Client({
|
||||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.DirectMessages],
|
||||
|
|
|
|||
Loading…
Reference in a new issue