Discord bot
Managed from: GamePanel. 7 answers, updated 14 November 2026.
Essentials 3
How do I put my Discord bot online?
Upload your bot's files in GamePanelFiles or over SFTP, check the main file in GamePanelServer Options, then start the server from the console. Dependencies install at startup.
Prepare your project without the
node_modulesfolder (or the Python virtual environment): the server installs the dependencies itself frompackage.jsonorrequirements.txt.GamePanelFiles: upload your files to the root (New, Upload), or a zip archive that you then extract. For a large project, use SFTP (GamePanelSystemSFTP Details).
GamePanelServer Options: the main file is the file that starts the bot (
index.jsby default in Node.js,bot.pyin Python). In Java, it is the .jar file setting (bot.jarby default). A file in a folder is written with its path, for examplesrc/index.js.Add the bot's token in a
.envfile (next question).GamePanelConsole: click Start. The console shows the dependency install, then the bot's log.
Common errors
- "Cannot find module" or "No such file": the main file does not match the name or path of your file.
node_modulesfolder uploaded from your computer: delete it, it is reinstalled at startup for the server.
Where do I put my bot's token?
In a .env file at the root of the server, created in GamePanelFiles: DISCORD_TOKEN=your_token. Your code reads it with dotenv in Node.js or python-dotenv in Python. Never put it in the code or in a public repository.
GamePanelFiles: create a
.envfile with the lineDISCORD_TOKEN=your_token(copy the token from the Discord developer portal, Bot tab).Node.js: add
dotenvto yourpackage.json, thenrequire('dotenv').config();at the top of the main file; the token is inprocess.env.DISCORD_TOKEN.Python: add
python-dotenvtorequirements.txt, thenfrom dotenv import load_dotenvandload_dotenv(); the token is inos.getenv("DISCORD_TOKEN").Restart the bot from the console.
Common errors
- "An invalid token was provided" (discord.js) or "Improper token has been passed" (discord.py): the token was copied wrong, or regenerated in the developer portal since. Copy it again into
.env. - Token pushed to a public GitHub repository: Discord revokes it. Regenerate it in the developer portal and keep
.envout of the repository (a.envline in.gitignore).
Does my bot restart on its own if it crashes?
Yes. When the bot stops on an error, the GamePanel restarts it automatically. An exception, there to avoid a loop: a second crash less than a minute after the first one leaves the bot stopped.
GamePanelConsole: read the last lines before the stop, they give the error.
Fix the code or the configuration (token, main file, missing dependency).
Click Start.
Common errors
- A bot that crashes right at startup stays stopped after the second try: it is almost always the token, an intent that is not enabled or a missing dependency.
Guides 2
How do I deploy my bot from GitHub?
In GamePanelServer Options, fill in the Git repository address (and the Git branch if needed), then reinstall the server: the repository is cloned at install. With the Git update on startup set to 1, new commits are pulled at every start.
GamePanelServer Options: Git repository address, for example
https://github.com/you/my-bot, and Git branch if it is not the default branch.Private repository: also fill in the Git user and the Git access token (a GitHub token that can read this repository).
With the server stopped, GamePanelAdvancedServer Actions: click Reinstall Server. The repository is cloned; a file already on the server is never overwritten.
Git update on startup: set it to 1 to pull new commits at every start.
Create the
.envfile with the token (it must not be in the repository), then start.
Common errors
- Repository not cloned: files with the same names were already on the server. Delete them (keep
.env), then reinstall.
How do I use my bot's MySQL database?
Create the database in GamePanelManagementDatabasesCreate, then copy its host, port, name, user and password into your bot's .env file. One to five databases depending on the plan.
GamePanelManagementDatabasesCreate: give the database a name.
Copy the host, port, database name, user and password shown.
Add them to the
.envfile (for exampleDB_HOST=,DB_USER=,DB_PASSWORD=,DB_NAME=) and read them in your code.Node.js: the
mysql2library; Python:aiomysqlorPyMySQL, added to your dependencies.
Common errors
- Connection refused on
localhost: the database is not on the same server as the bot, use the host shown in the GamePanel.
Troubleshooting 2
My bot stops with "Used disallowed intents"
Your code asks for a privileged intent (server members, presence, message content) that is not enabled for your bot. Enable it in the Discord developer portal, then restart the bot.
Open discord.com/developers/applications, your application, Bot tab.
"Privileged Gateway Intents" section: enable the ones your code uses (Server Members Intent, Presence Intent, Message Content Intent).
Save, then restart the bot from GamePanelConsole.
Common errors
- discord.py shows "PrivilegedIntentsRequired" for the same reason.
- Beyond 100 servers, Discord asks for the bot to be verified before granting these intents.
My bot cannot send emails
Outgoing port 25 is closed to block spam. Use your mail provider's SMTP server on port 587 (STARTTLS) or 465 (SSL), with its credentials.
Get the SMTP address, port 587 or 465 and a sending login from your mail provider.
Configure your library (nodemailer, smtplib…) with these values, kept in
.env.Restart the bot.
Common errors
- Timeout on port 25: that is the block, change the port.
No answer here. Try the help center home page or open a ticket.
Can't find it? Open a ticket from your client area. Terms and conditions: helloserv.fr/en/legal