Skip to content

troubleshooting

willianpm edited this page Mar 14, 2026 · 9 revisions

Troubleshooting

Bot Does Not Start

Checks:

  • Ensure TOKEN and CLIENT_ID are present in environment file.
  • Confirm APP_ENV value is prod or staging.
  • Confirm Node.js version is 22 or higher.

Commands Not Visible in Discord

Checks:

  • Run deployment command again.
  • Confirm CLIENT_ID matches the target bot application.
  • Wait for global command propagation.

Suggested commands:

npm run deploy
npm run deploy:staging

Poll Votes Out of Sync

The startup flow automatically:

  • synchronizes message reactions into active poll state
  • enforces max vote limits and removes excess reactions

If needed, restart bot and inspect logs for channel permission issues.

Dashboard API Returns 401

Checks:

  • Send Authorization header with Bearer token format.
  • Validate token format expected by dashboard/api/auth.js.

CSV Upload Fails

Checks:

  • Use multipart/form-data.
  • Ensure file extension or mime indicates CSV.
  • Keep file size under 5 MB.
  • Ensure required columns exist and use semicolon delimiter.

Data Issues Across Environments

Checks:

  • Confirm APP_ENV value at runtime.
  • Inspect target directory under data/environments/prod or data/environments/staging.
  • Run migration script when moving legacy files.
npm run migrate:data

Clone this wiki locally