Back
Discord Bots

View logs and debug a crashing bot

Use the Console to read your bot output, understand a crash, and fix the usual culprits on Victus — bad token, missing intents, missing modules, wrong entry file and crash loops.

logsdebugcrashconsoleerrorexitedtroubleshooting

Your bot's logs are its live Console in the panel — everything it prints to stdout/stderr shows up there in real time, and stays visible until the next restart. When a bot will not stay up, the answer is almost always in the last few lines before the process exited. This guide shows how to read them and fix the usual causes.

Read the Console the right way

  • Open the bot and look at the Console tab — it streams live output while the server runs.
  • When a bot crashes you will see a line like "process exited with code 1" — scroll up from there to the real error (a stack trace, a rejected promise, an import error).
  • Restart to reproduce cleanly: the Console clears the visible buffer on start, so you get the crash from the top without old noise.
  • Copy the error text (redacting any token) when asking for help — the exact message matters.

The usual crash causes

Symptom in the ConsoleLikely causeFix
TokenInvalid / "An invalid token was provided"Wrong, empty or reset tokenRe-check the Startup variable or .env; reset the token in the Developer Portal and restart.
"Used disallowed intents"Privileged intents not enabledTurn on Message Content / Server Members intents on the Developer Portal Bot page.
"Cannot find module" / "ModuleNotFoundError"Dependency not installed / not in manifestAdd it to package.json or requirements.txt and restart (see "Install dependencies").
"Cannot find module '/home/container/index.js'"Wrong entry file, or code in a nested folderFix the main-file variable in Startup, or move files to the server root.
EADDRINUSE / port already in useTwo things bound to the same portUse the exact port from the Network tab; run only one process.

Immediate crash loop = stop and read

If the server flaps between starting and stopping, the panel will throttle auto-restarts. Do not keep hammering Start — read the first error after a clean restart and fix that. A restart cannot fix a bad token or a missing module.

Get more detail from your bot

javascript
// Node.js — surface the errors that usually kill a bot silently
process.on('unhandledRejection', (err) => console.error('UNHANDLED REJECTION:', err));
process.on('uncaughtException', (err) => console.error('UNCAUGHT EXCEPTION:', err));

client.on('error', console.error);
client.on('warn', console.warn);
python
# Python — enable discord.py's logging to the console
import logging
logging.basicConfig(level=logging.INFO)

Rule out the platform, then reinstall or open a ticket

If nothing in your code changed and the bot suddenly will not start, check https://status.victuscloud.com for node incidents. If the node is healthy but the bot still fails, reinstall from the Settings tab (this re-clones/reinstalls but keeps your files) or open a ticket with the Console error pasted in.