Running a bot on your own PC means it goes offline when you shut down. On a Slime Host bot plan it stays online all the time.
1. Get your bot token
- Open the Discord Developer Portal and select your application.
- Go to Bot and press Reset Token. Copy it.
- Turn on the Privileged Gateway Intents your code needs (for example Message Content).
The token is the password of your bot. Never paste it in public, in screenshots or in a GitHub repository.
2. Upload your bot
Open your bot server in the game panel and go to Files. Upload your project files, for example:
index.js
package.json
or for Python:
main.py
requirements.txt
Don’t upload the node_modules folder: it is installed for you from package.json.
3. Store the token in a .env file
Create a file named .env in Files:
DISCORD_TOKEN=paste-your-token-here
Read it in your code instead of writing the token directly. In Node.js with the dotenv package:
require("dotenv").config();
client.login(process.env.DISCORD_TOKEN);
4. Set the start file and start
In the Startup tab, set the main file (for example index.js or main.py). Then press Start in the Console. Errors appear there if something is missing.
Running it on a VPS instead
On a VPS, use pm2 so the bot restarts after crashes and reboots:
npm install -g pm2
pm2 start index.js --name my-bot
pm2 save
pm2 startup
Run the command that pm2 startup prints, and your bot will start with the server. Check it with pm2 logs my-bot.