A Discord bot is configured on the My bot page: enter the Startup file, add your Packages (dependencies), store the token in the Secret variables (.env), then start it. If you do not have any code yet, the Starter bot card creates a working bot in one click.
Before you start
Create your application on the Discord developer portal (discord.com/developers), add a bot, copy its token and invite it to your Discord server. If your bot reads the content of messages or the member list, enable the matching Privileged Gateway Intents on the portal.
Bring your bot online
- Upload your code in Files (drag and drop, a .zip archive to extract, or a Git repository from the Git button). Do not upload the
node_modulesfolder or a Python virtual environment: they are recreated on the server. - Open My bot › Startup file and choose the file launched at startup (
index.js,bot.py,main.py…). - In Packages (dependencies), type the names of the libraries (
discord.js,discord.py,dotenv…). They are installed at the next start. Apackage.jsonor arequirements.txtpresent is also taken into account. - In Secret variables (.env), add
DISCORD_TOKENwith your token. Your code reads it withprocess.env.DISCORD_TOKEN(Node.js) oros.getenv("DISCORD_TOKEN")(Python). - Click Start and follow the Console.
Change the Node.js or Python version
The Language page lists the versions available for your bot. Choose one, install it, then restart.
The bot stops on its own
- Read the console: a
TOKEN_INVALIDorUsed disallowed intentserror is explained by the panel's diagnostic. - A missing module error: add the package under Packages.
- To have it restart after an outage, add the Automatic start task under More options › Automatic tasks.
Frequently asked questions
My bot needs a database. Create a MySQL database under More options › Databases and add its credentials to the .env.
My bot needs a port (API, dashboard)? The ports open for your bot are listed under More options › Ports.
To go further: host a discord.js bot 24/7 and host a Discord bot in Python.