Python Bot Hosting

We provide Python 3.9, 3.10, 3.11, and 3.12 containers. The system automatically handles virtual environments and dependency management for you.

1. Handling Dependencies

You must provide a requirements.txt file in the root directory. If you don't have one, create it. For example:

discord.py==2.3.2 python-dotenv requests motor

The panel will automatically run pip install -r requirements.txt upon startup.

2. Securing Your Tokens (.env)

Never hardcode your Discord Bot Token or API keys directly into your code. Use environment variables.

Create a file named .env in your root directory:

DISCORD_TOKEN=MTA... (your token here)

In your code, use the python-dotenv package to load these variables securely:

import os import discord from dotenv import load_dotenv load_dotenv() TOKEN = os.getenv('DISCORD_TOKEN') client = discord.Client(intents=discord.Intents.default()) client.run(TOKEN)

3. Startup Configuration

In the Startup tab, ensure the Main File variable is set to your entry point (e.g., bot.py or main.py). The container will execute python <Main File>.

Keeping the Bot Online

Unlike running a bot on your own PC, our panel automatically monitors the process. If your bot crashes due to a coding error or uncaught exception, the panel will automatically attempt to restart it, ensuring maximum uptime.