Update token retrieval to prioritize bot-specific token

Update bot.js to exclusively use DISCORD_BOT_TOKEN and update error messaging.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e72fc1b7-94bd-4d6c-801f-cbac2fae245c
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 1d2d6a03-0a86-4bd5-b2fb-427d3825c601
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/e72fc1b7-94bd-4d6c-801f-cbac2fae245c/7DQc4BR
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sirpiglr 2025-12-07 22:20:19 +00:00
parent d8a6ed6d56
commit aa5d4e9b82
2 changed files with 6 additions and 2 deletions

View file

@ -22,6 +22,10 @@ externalPort = 80
localPort = 8080
externalPort = 8080
[[ports]]
localPort = 45993
externalPort = 3000
[workflows]
runButton = "Project"

View file

@ -15,11 +15,11 @@ const fs = require("fs");
const path = require("path");
require("dotenv").config();
const token = process.env.DISCORD_BOT_TOKEN || process.env.DISCORD_TOKEN;
const token = process.env.DISCORD_BOT_TOKEN;
const clientId = process.env.DISCORD_CLIENT_ID;
if (!token) {
console.error("Missing DISCORD_BOT_TOKEN or DISCORD_TOKEN");
console.error("Missing DISCORD_BOT_TOKEN environment variable");
process.exit(1);
}