completionId: cgen-8af31085c24647f5b9fd491559cd1817

cgen-8af31085c24647f5b9fd491559cd1817
This commit is contained in:
Builder.io 2025-11-08 22:11:33 +00:00
parent 327a321bc5
commit a73bf279b0

View file

@ -922,6 +922,19 @@ export function createServer() {
});
}
// Validate token format
if (!botToken.includes(".") || botToken.length < 50) {
console.warn(
"[Discord] Bot token appears invalid - length:",
botToken.length,
);
return res.status(500).json({
error:
"Discord bot token appears invalid (check DISCORD_BOT_TOKEN in environment)",
tokenLength: botToken.length,
});
}
// Register slash commands
const commands = [
{