Discord bot starter on Railway
discord.py, the async Python library for Discord bots, as a slash-command starter with Postgres on Railway.
discord.py is an open-source Python library for the Discord API, maintained by Rapptz and contributors. It uses async/await, handles Discord's rate limits, and includes a commands extension and app commands for building bots with slash commands.
Developers use it for community and moderation bots, utilities and integrations with their own services. A discord.py bot is a long-running process that keeps a WebSocket connection to Discord's gateway, so it needs a host that stays online and reconnects after network interruptions.
discord.py is MIT-licensed. Bots built with it must also follow Discord's Developer Terms of Service and Developer Policy.
What Discord bot starter can do
- Async/await API on Python's asyncio
- Rate-limit handling built in
- Slash commands through app commands, with command sync to Discord
- Commands extension with cogs for organising code
- Sharding with AutoShardedBot for very large bots
- Optional voice support through the voice extra
What people use it for
- Community bots with FAQ tags and reminders
- Moderation helpers and role menus
- Integrations between Discord and your own APIs
- Learning to write and deploy a Discord bot in Python
Videos
Running Discord bot starter on Railway
The Railway template is a starter bot on discord.py 2.7.1 and Python 3.13.18, with every dependency pinned, plus PostgreSQL 18.6 on the private network with a volume. It ships slash commands for help, latency, reminders and per-server tags, needs no privileged intents and has no public domain, only a private /healthz endpoint for Railway's healthcheck. Measured on Railway, the bot idled at about 55 MB of RAM and Postgres at about 100 MB.
Discord bot starter templates on Railway
Tracklayer templates are listed first. Other Discord bot starter templates follow, ordered by total deployments on Railway. How this works.
Deployment numbers as of 2026-11-25.
Questions about Discord bot starter
Do I need to enable privileged intents?
Not for the Railway starter, which uses Discord's default intents only. If you later add commands that read message content, members or presences, enable the matching privileged intent for your application in the Discord Developer Portal.
Why do new slash commands take time to appear?
Global commands can take a few minutes to show up the first time. The starter's DISCORD_GUILD_ID variable copies the commands to one server, where updates appear immediately, which helps while developing.
How many servers can one bot process handle?
The template's README says one process handles thousands of servers. Very large bots need discord.py's sharding with AutoShardedBot.
Can I build a music bot with this starter?
It does not include music or YouTube playback, selfbot or mass-DM features, because they break Discord's or Railway's terms. discord.py itself supports voice through an optional extra.
Is the template official?
No. It is a community template, not affiliated with Discord, the discord.py project or Railway. Discord is a trademark of Discord Inc.
Guides
Similar apps
Tracklayer maintains the templates marked as such; Discord bot starter is a trademark of its owners and this site is not affiliated with them.
