Guides

Guides

Making a Discord bot in Python or JavaScript, keeping it online, and fixing it when it breaks. Useful whether or not you host with us.

Your first bot

Make a Discord bot in Python

Build your first Discord bot in Python: create the application, get a token, invite it, write a bot with slash commands in discord.py, keep the token safe, and run it.

10 minute read

Make a Discord bot in JavaScript

Build your first Discord bot in JavaScript with discord.js 14: create the application, invite it, register slash commands, keep the token in a .env file, and run it with Node.js.

10 minute read

Keeping it online

How to keep a Discord bot online 24/7

Your bot goes offline when your PC sleeps. Here is every realistic way to keep it running around the clock, what each costs, and the catches.

7 minute read

How to choose Discord bot hosting

What actually matters when picking a Discord bot host: sleeping, reserved memory, current Python and Node versions, Git deploys, crash handling, where backups live, renewal prices and who answers support.

9 minute read

How to host a discord.py bot

Prepare a discord.py bot for hosting: read the token from the environment, pin dependencies, and deploy it so it stays online. Step by step.

6 minute read

How to host a discord.js bot

Get a discord.js bot ready for a server: token in the environment, a clean package.json, intents, slash command registration and ES modules, then run it so it stays online.

7 minute read

How to host a JDA (Java) Discord bot

Get a Java Discord bot built with JDA ready for a server: a fat jar with Gradle or Maven, the token from the environment, sensible intents and caches, heap size, and a clean shutdown, then keep it running.

7 minute read

Deploy a Discord bot from GitHub

Stop uploading files by hand: run your Discord bot straight from a GitHub repository, keep the token out of it, use private repositories safely, and redeploy when you push.

6 minute read

Moving a Discord bot off Replit or Heroku

How to move a Discord bot that runs on Replit or Heroku to somewhere it stays online: exporting the code, replacing Replit DB and Secrets, dropping keep-alive pings.

8 minute read

Running a Discord bot as a systemd service

Keep a Python Discord bot running on your own Linux server or Raspberry Pi: a systemd unit that starts at boot, restarts on crash, and keeps the token out of your code.

7 minute read

Building and fixing

Slash commands in discord.py

How to add slash commands to a discord.py 2 bot, sync them properly, respond within Discord's three seconds, and fix commands that do not show up.

8 minute read

Slash commands in discord.js

How to build slash commands in discord.js 14: define them, register them globally or to one server, reply within three seconds, add options, and fix commands that never appear.

9 minute read

Organising a discord.py bot with cogs

How to split a growing discord.py 2 bot into cogs and extensions: the file layout, loading them in setup_hook, slash and prefix commands in a cog, listeners, reloading without a restart, and the errors people hit.

8 minute read

Scheduled tasks in a Discord bot

How to run code on a schedule inside a Discord bot: discord.py's tasks.loop with fixed times, setInterval and node-cron in discord.js, surviving restarts, time zones, and not tripping rate limits.

7 minute read

Discord bot is online but not responding

Your bot shows as online but ignores every command. The eight usual causes, from the message content intent to an on_message that swallows commands, and how to check each.

7 minute read

Discord API rate limits, explained

What Discord's rate limits are, what a 429 means, the global and invalid-request limits that get bots temporarily banned, and how to stop hitting them.

7 minute read

How much RAM does a Discord bot need?

Realistic memory use for Python Discord bots, what makes it grow (member cache, message cache, music, images), how to measure yours, and how to cut it down.

6 minute read

Security

Keeping your Discord bot token safe

A leaked bot token gives someone full control of your bot. How tokens leak, how to store one safely, and exactly what to do if yours gets out.

5 minute read