Skip to content

fix: validate required bot environment variables at startup#138

Merged
DeadIndian merged 1 commit into
DeadIndian:mainfrom
KGFCH2:fix/bot-env-validation
Jun 3, 2026
Merged

fix: validate required bot environment variables at startup#138
DeadIndian merged 1 commit into
DeadIndian:mainfrom
KGFCH2:fix/bot-env-validation

Conversation

@KGFCH2
Copy link
Copy Markdown
Contributor

@KGFCH2 KGFCH2 commented Jun 2, 2026

Related Issue

Closes #137

Summary

Adds startup validation for required Discord bot environment variables so configuration errors fail fast.

Changes Made

  • Added env validation in bot/index.js
  • Validates DISCORD_TOKEN, DISCORD_CLIENT_ID, API_URL, and BOT_API_KEY
  • Exits with a descriptive error if any variable is missing

Testing

  • Verified bot exits on missing env vars
  • Confirmed normal startup with full env config

Impact

Improves developer experience and reduces runtime mystery failures.

Checklist

  • Code follows project standards
  • Tested locally
  • No unrelated changes included
  • Startup validation added

@DeadIndian DeadIndian added good first issue Good for newcomers newbie Level 1 issue for ELUSOC 2026 ELUSOC labels Jun 3, 2026
@DeadIndian DeadIndian merged commit 6b12163 into DeadIndian:main Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ELUSOC good first issue Good for newcomers newbie Level 1 issue for ELUSOC 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Bot startup does not validate required environment variables

2 participants