Everything you need to deploy and manage your Discord bots on BotHost.
Welcome to BotHost! This guide will walk you through deploying your first Discord bot in minutes.
You can try for free for 7 days with our Starter plan, no credit card required!
Before deploying on BotHost, you need to create a Discord application:
Never share your token! If your token is compromised, regenerate it immediately on the Developer Portal.
Once your files are ready, here's how to deploy them on BotHost:
BotHost supports Python 3.10+ with major Discord libraries.
# Structure de fichiers
my-bot/
├── main.py # Point d'entrée
├── requirements.txt # Dépendances
├── cogs/ # Commandes (optionnel)
└── utils/ # Utilitaires (optionnel)
discord.py>=2.0.0
python-dotenv
aiohttp
import discord
from discord.ext import commands
import os
bot = commands.Bot(
command_prefix="!",
intents=discord.Intents.all()
)
@bot.event
async def on_ready():
print(f"✅ Connecté en tant que {bot.user}")
@bot.command()
async def ping(ctx):
await ctx.send(f"🏓 Pong! {round(bot.latency * 1000)}ms")
bot.run(os.getenv("DISCORD_TOKEN"))
BotHost supports Node.js 18+ with discord.js v14.
# Structure de fichiers
my-bot/
├── index.js # Point d'entrée
├── package.json # Dépendances
├── commands/ # Commandes slash
└── events/ # Événements
{
"name": "my-discord-bot",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"discord.js": "^14.0.0",
"dotenv": "^16.0.0"
}
}
const { Client, GatewayIntentBits } = require('discord.js');
require('dotenv').config();
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent
]
});
client.on('ready', () => {
console.log(`✅ Connecté en tant que ${client.user.tag}`);
});
client.on('messageCreate', async (message) => {
if (message.content === '!ping') {
await message.reply(`🏓 Pong! ${client.ws.ping}ms`);
}
});
client.login(process.env.DISCORD_TOKEN);
Environment variables allow you to securely store sensitive data like your Discord token.
DISCORD_TOKEN - Your Discord bot token
PREFIX - Command prefix (!)
DATABASE_URL - Database connection URL
Monitor your bot's activity in real time with logs.
print() in Python or console.log() in JS for debugging.Here are the most common issues and their solutions:
If you can't find the solution to your problem, feel free to contact our support or join our Discord server.