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
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.
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
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
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
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
Looking for free Discord bot hosting? What free options exist, why most free tiers put bots to sleep, and when it is worth paying a few dollars instead.
6 minute read
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
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
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
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
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
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
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
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
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
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
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
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
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
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