Make a Discord bot in Python
Build your first Discord bot in Python with discord.py: slash commands, replies to messages, embeds, buttons, and fixes for the usual errors.
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 with discord.py: slash commands, replies to messages, embeds, buttons, and fixes for the usual errors.
Build your first Discord bot in JavaScript with discord.js 14: slash commands, replies to messages, embeds, buttons, and keeping it running.
Build your first Discord bot in Java with JDA 6: slash commands, an embed, a button, replies to messages, a runnable jar, and fixes for the usual errors.
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.
What matters when picking a Discord bot host: sleeping, reserved memory, current Python and Node, Git deploys, crash restarts, backups and renewals.
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.
Keep a Python Discord bot running on a Linux VPS or Raspberry Pi with systemd: start at boot, restart on crash, token out of the code.
Move a Discord bot off Replit or Heroku to a host where it stays online: export the code, replace Replit DB and Secrets, drop keep-alive pings.
When a Discord bot has to shard (2,500 servers), what a shard is, and how to do it in discord.py and discord.js: one process or several, memory and limits.
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.
Get a discord.js bot ready for hosting: token in the environment, a clean package.json, intents, slash commands, then keep it online 24/7.
Get a JDA Discord bot ready for hosting: a fat jar with Gradle or Maven, the token from the environment, intents, heap size and shutdown.
Run your Discord bot straight from a GitHub repository: keep the token out of it, use private repos safely, and redeploy on every push.
Slash commands in discord.py 2: sync them properly, options, choices, autocomplete, permissions, cooldowns, groups, and fixing ones that don't show.
Slash commands in discord.js 14: register them, options, autocomplete, permissions, cooldowns, subcommands, right-click commands, and fixes.
Add buttons, select menus and pop-up forms to a discord.py bot: Views, callbacks, timeouts, disabling, buttons that survive a restart, and common errors.
Buttons, select menus and pop-up forms in discord.js 14: builders, handling the interaction, collectors with time limits, modals with labels, and errors.
Send embeds with discord.py 2: fields, colours, images from your own files, timestamps, editing, the size limits, and why an embed does not show.
Send embeds with discord.js 14's EmbedBuilder: fields, colours, images from your own files, timestamps, editing, the limits, and the errors people hit.
Post to a Discord channel without a bot: create a webhook, send text and embeds from Python, JavaScript or curl, attach files, edit messages, rate limits.
Give a discord.py or discord.js bot a real database: SQLite first, with a working warnings system, then MySQL when you outgrow it, and the usual errors.
Split a discord.py 2 bot into cogs: file layout, loading in setup_hook, slash and prefix commands, listeners, reloading and common errors.
Run code on a schedule in a Discord bot: discord.py tasks.loop, setInterval and node-cron in discord.js, time zones, restarts and rate limits.
Set a Discord bot's status in discord.py and discord.js: Playing, Watching, Listening, a custom status, one that changes, and why it resets.
Greet people who join and say goodbye when they leave, in discord.py and discord.js: the intent to switch on, an embed, a DM, and the goodbyes bots miss.
Give members a role when they react, in discord.py and discord.js: the permission, intents and partials it needs, taking it back, and buttons instead.
Slash commands to time out, kick, ban and unban in discord.py and discord.js, with the role check most examples skip and Discord's refusals explained.
A button that opens a private ticket channel per member, in discord.py and discord.js: the permissions, one ticket each, closing, and a ready-made bot.
Log deleted and edited messages to a staff channel in discord.py and discord.js: the intent, messages from before a restart, and what a bot cannot know.
A /giveaway command with an Enter button in discord.py and discord.js: entries, a random winner, and giveaways that survive the bot restarting.
Your bot shows as online but ignores commands. The eight usual causes, from the Message Content intent to on_message, and how to check each.
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.
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.
Fix discord.py 1 code on discord.py 2: intents, Message Content, async cogs, bot.loop, avatar_url, Embed.Empty and history().flatten().
Fix discord.js 12 and 13 code on v14: MessageEmbed is not a constructor, reading 'FLAGS', Invalid bitfield flag GUILDS and empty messages.
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.
Put an HTML site, or one built with Vite, Astro, Hugo or Jekyll, on your own domain with HTTPS: what to upload, clean URLs, single-page apps and DNS.
Run a Flask app in production: gunicorn instead of the dev server, the port from the environment, secrets out of the code, and HTTPS on your domain.
Run Django in production: gunicorn, DEBUG off, ALLOWED_HOSTS and CSRF behind a proxy, static files with WhiteNoise, migrations, and HTTPS on your domain.
Run FastAPI in production: uvicorn workers, not --reload, the port from the environment, proxy headers, secrets in .env, and HTTPS on your domain.
Run an Express or Node.js app in production: the right port and address, trust proxy, secrets out of Git, crash restarts and HTTPS on your domain.
Run Next.js on your own server: next start or standalone output, the port and hostname, why the build needs far more memory than the app, and HTTPS.
Run a Spring Boot app on your own server: one runnable jar, the port from SERVER_PORT, proxy headers for HTTPS, settings beside the jar, and memory.
Run a web dashboard next to your Discord bot: sign-in with Discord belongs on HTTPS, so put it on your own domain, trust the proxy, keep sessions safe.
No guides match that yet. Tell us what you need.