Short answer
- JavaScript / TypeScript: discord.js, the most widely used Node.js library, with an official guide.
- Python: discord.py, actively maintained again since 2022 with app_commands for slash commands.
- Java, C# and Rust each have a mature option: JDA, Discord.Net and serenity.
Comparison
| Library | Language | Latest version | License | Notes |
|---|---|---|---|---|
| discord.js | Node.js 18+ | 14.27.0 (July 2026); v15 in development | Apache-2.0 | Builders, collectors, sharding manager, official guide |
| discord.py | Python 3.8+ | 2.7.1 (March 2026) | MIT | app_commands, views for components, extensions and cogs |
| JDA | Java | See releases | Apache-2.0 | Long-standing Java library |
| Discord.Net | C# | See releases | MIT | Interaction framework for .NET |
| serenity | Rust | See releases | ISC | Often paired with the poise command framework |
Versions and licenses checked on 2026-10-22 on PyPI, npm and the projects' GitHub pages. Check the changelog before upgrading. For JDA, Discord.Net and serenity we link the release pages instead of quoting versions.
discord.js vs discord.py
| Aspect | discord.js | discord.py |
|---|---|---|
| Slash command definition | SlashCommandBuilder objects, registered with a REST script | Decorators and type hints, synced with tree.sync() |
| Buttons and menus | Builders plus collectors or interaction handlers | discord.ui.View classes |
| Typing | TypeScript definitions included | Type hints throughout |
| Large bots | ShardingManager for multiple processes | AutoShardedClient in one process |
| Learning path | Slash commands in discord.js v14 · Tutorial: Discord bot with discord.js | Guide: Discord bot in Python |
What about the discord.py forks?
Forks such as Pycord and nextcord appeared in 2021 when discord.py was briefly paused. discord.py resumed development in 2022, so for a new Python bot it is the natural default; if you already use a fork and it is maintained, there is no urgent reason to switch.
Hosting is the same for all
Gateway bots keep a WebSocket open, so they need an always-on process (a VPS or a PaaS worker), not a sleeping free tier. Bots that only use interactions over HTTP can run serverless. Discord bot hosting 24/7 · Railway · Vultr
Related guides and tools
- Guide: Discord bot in Python
- Tutorial: Discord bot with discord.js
- Slash commands in discord.js v14
- Free hosting for Discord bots
- Discord bot hosting 24/7
- Designing bot commands and menus
Frequently asked questions
Is discord.js or discord.py better?
Neither is better overall. Both support the current API well; choose the language you are most productive in.
Should I wait for discord.js v15?
No. v14 is the stable line at the time of writing; v15 development builds are not meant for production. Upgrade when v15 is released and its migration guide is out.
Do I need sharding?
Only for large bots. Discord requires sharding at 2,500 servers; below that a single connection is enough.