Help Center
Common reasons a bot will not start
Quick fixes for the errors that most often stop a bot from coming online.
Quick steps
- Invalid token: check the environment variable name and value, with no extra spaces. If you reset the token in Discord, update it here.
- Missing module or package: make sure the dependency file lists it, then restart so it installs.
- Wrong start file: check the Startup File setting matches the file in your upload exactly, including capitals and folder.
- Disallowed intents: turn on the privileged intents your bot uses in the Discord developer portal.
- Version mismatch: choose a runtime version your libraries support.
- Out of memory: if the bot restarts repeatedly, check the pool meters and give it more memory, or upgrade your pool.
- Read the logs first. The last few lines normally name the problem.
Error messages and what they mean
- "An invalid token was provided" or "Improper token": the token variable is wrong, empty or was reset.
- "Cannot find module" (Node.js) or "ModuleNotFoundError" (Python): a dependency is missing from your package file.
- "Used disallowed intents": a privileged intent is not turned on in the developer portal.
- "ENOENT" or "No such file": the startup file or another file is not where the bot expects it.
- "SyntaxError": the code uses a feature your runtime version does not support, or has a typing mistake.
- "Killed" or an out-of-memory message: the bot used more memory than it was given.
Test locally first
Most start errors can be reproduced on your own computer with the same runtime version. Fixing it locally first is usually the fastest route.
Never share your password, a bot token, a private key or card details with anyone, including Hartwell staff.
Related articles
- My bot is offline or keeps stopping Why a bot goes offline and how to bring it back.
- Get your bot ready before you upload The five checks that prevent most deployment problems.
- Keep your bot token safe How to protect your token and what to do if it leaks.
Still stuck? Open a support request from your dashboard, or use /support in the Hartwell Discord server.