Discord Bots Guides

Deploy Node.js and Python bots, process management and monitoring.

Deploy Discord bot with Node.js

Upload and run your Discord bot in Node.js with automatic restart and persistent logs.

5 minNode.jsDiscord.jsDeploy

Deploy Discord bot with Python

Configure and run a Python bot (discord.py) with virtual environment and systemd.

5 minPythondiscord.pyDeploy

Monitor your bot uptime

Set up alerts to know if your bot disconnects and restart it automatically.

3 minMonitoringUptime

Create a Discord bot from scratch

Register your app in the Discord Developer Portal, create a bot user, get the token and invite it to your server with proper permissions.

5 minDiscord Developer PortalTokenPermissions

Configure Slash Commands

Register slash commands globally and per-guild, handle interactions, options, subcommands and autocomplete.

6 minSlash CommandsInteractionsdiscord.js

Manage bot permissions and roles

Bot permissions calculator, role hierarchy, permission checks in commands and intents.

4 minPermissionsRolesIntents

Connect a database to your bot

Integrate SQLite, MongoDB or PostgreSQL with your bot to store user data and configurations.

7 minDatabaseSQLiteMongoDB

Run multiple bots on a VPS

Manage multiple bots with PM2 ecosystem files, systemd units and resource allocation on a single server.

4 minPM2Multiple botsResources

Update your bot with zero downtime

Deploy strategies with git pull + PM2 reload, blue-green with systemd and CI/CD with GitHub Actions.

5 minDeployCI/CDZero downtime

Logging and debugging your bot

Configure Winston or Pino for Node.js, Python logging module, log levels, structured logging and rotation.

5 minLoggingDebugWinston

Handle Discord API rate limits

Understanding the bucket system, handling 429 responses, implementing queues and best practices.

4 minRate LimitsAPIOptimization

Configure and use Discord Webhooks

Create webhooks, send messages and embeds, set up notifications and server monitoring alerts.

4 minWebhooksNotificationsEmbeds

Token security and best practices

Protect your token with .env files, avoid accidental commits, token rotation, 2FA and detecting compromises.

3 minSecurityToken.env

Automatic moderation bot

Anti-spam system, word filter, raid protection, warn/mute/ban system and audit logs.

8 minModerationAnti-spamAutoMod

Ticket and support bot

Ticket system with buttons, transcript generation, categories, staff roles and auto-close inactive tickets.

7 minTicketsSupportButtons