discord.py
Async Python library for building Discord bots, with a command framework and task helpers.
A popular, well-documented way to build your own Discord bot in Python, from a welcome bot to a community alert service.
Who it is for
Python users who run a Discord server and want a custom bot for greetings, reminders or alerts.
Strengths
- Modern async/await API with rate limit handling built in.
- A commands extension (discord.ext.commands) to organise bot commands, plus discord.ext.tasks helpers for repeating jobs.
- Installs with pip; the README recommends a virtual environment and offers an optional voice extra.
- Well-known project with an active repository.
Good to know
- You need to write Python code; it is not a no-code tool.
- Only for Discord; other chat platforms need a different library.
- You host the bot yourself, so you manage the server it runs on.
- Voice support needs extra packages (PyNaCl, and system libraries on Linux).
Custom bots are coming soon
We are preparing a service to build bots on tools like this one. Follow our Telegram channel to know when it opens.
Compare it with others
3Commas vs Cryptohopper vs Superalgos: hosted crypto bots or a free open-source platform?
Two hosted crypto bot platforms and one free open-source one, compared side by side: plans and trials, demo and paper trading, limits, licences and who each suits. Facts taken from each tool's review page.
PyBroker vs LumiBot vs bt: free Python frameworks for backtesting strategies
Three free Python frameworks compared: PyBroker for machine-learning strategies with walk-forward tests, LumiBot for going from backtest to paper trading and a broker, and bt for portfolio allocation and rebalancing. Licences, level and who each suits.
Freqtrade vs OctoBot vs Passivbot: which free crypto bot suits you
Three free, open-source crypto bots compared side by side: interface, simulated mode, backtesting, markets, licence, level and who each one suits.
Quick answers
How much does discord.py cost?
Free and open source. Prices change, so check the official website before you decide.
Is discord.py open source?
Yes. License: MIT.
Who is discord.py for?
Python users who run a Discord server and want a custom bot for greetings, reminders or alerts.
What is discord.py written in?
discord.py is written in Python.
What should I know before using discord.py?
You need to write Python code; it is not a no-code tool. Only for Discord; other chat platforms need a different library. You host the bot yourself, so you manage the server it runs on. Voice support needs extra packages (PyNaCl, and system libraries on Linux).
Want a bot like this when custom bots open? Get notified · All comparisons · Guides
Sources
Every fact on this page comes from these sources, checked on 2026-11-11. If something has changed, the source wins.
- https://discordpy.readthedocs.io/en/stable/: what it is, commands extension, tasks helpers, rate limit handling
- https://raw.githubusercontent.com/Rapptz/discord.py/master/README.rst: Python 3.8 or higher, pip install, voice extra
- https://api.github.com/repos/Rapptz/discord.py: MIT, about 16,200 stars, last push 2026-09-07, not archived
Alternatives in Trading bots
Bolt for Python
Slack's Python framework for building Slack apps with events, slash commands and Socket Mode.
Freqtrade
Open-source crypto trading bot written in Python, with backtesting, parameter optimization, a simulated mode and Telegram control.
grammY
Telegram bot framework for TypeScript and JavaScript, with official plugins for conversations, menus, rate limiting and i18n.
Jesse
Python framework to research, backtest and trade crypto strategies, with optimization through Optuna.