Welcome to discord.py¶
discord.py is a modern, easy to use, feature-rich, and async ready API wrapper for Discord.
Features:
- Modern Pythonic API using async / await syntax
- Sane rate limit handling that prevents 429s
- Command extension to aid with bot creation
- Easy to use with an object oriented design
- Optimised for both speed and memory
Getting started¶
Is this your first time using the library? This is the place to get started!
- First steps:Introduction | Quickstart | Setting Up Logging
- Working with Discord:Creating a Bot Account | A Primer to Gateway Intents
- Examples: Many examples are available in the repository.
Getting help¶
If you’re having trouble with something, these resources might help.
- Try the Frequently Asked Questions first, it’s got answers to all common questions.
- Ask us and hang out with us in our Discord server.
- If you’re looking for something specific, try the index or searching .
- Report bugs in the issue tracker.
- Ask in our GitHub discussions page.
Extensions¶
These extensions help you during development when it comes to common tasks.
- discord.ext.commands – Bot commands framework
- discord.ext.tasks – asyncio.Task helpers
Manuals¶
These pages go into great detail about everything the API can do.
- API Reference
- Interactions API Reference
- discord.ext.commands API Reference
- discord.ext.tasks API Reference
Meta¶
If you’re looking for something related to the project itself, it’s here.
- Changelog
- Version Guarantees
- Migrating to v2.0
- Migrating to v1.0
Gorialis / readme.rst
Hover over Downloads and select the Windows category (do NOT press the instant download button):

From here, find the latest 3.6 (NOT 3.7, NOT 3.5) release and choose the x86-64 executable installer.

Tick the Add Python to PATH box and then press Install Now .

Once the installation is done, press Close.

Open Command Prompt by typing cmd into Search.

Install discord.py by using:
- py -3.6 -m pip install -U discord.py[voice] for voice support
- py -3.6 -m pip install -U discord.py for without voice support

Once the command finishes, discord.py has been successfully installed:

To run your bot script, go to where it is located, hold Shift and right click in an empty space in the folder, and press Open command window here :

Then type py -3.6 (make sure to include the .py ):

Your bot is now running.
Select Activities or press the Super button to open Search:

Once in Search, type in Terminal and select it:

Type in sudo apt-get update , typing in your password when prompted, to update your package repositories (this may take a while):

Once the repositories are updated, type in sudo apt-get install python3-dev python3-pip libffi-dev libopus-dev to install Python and voice libraries. When prompted, type y to confirm installation:

Install discord.py by using:
- python3 -m pip install -U discord.py[voice] for voice support
- python3 -m pip install -U discord.py for without voice support
Note that PyNaCl may take a long time to compile.

Once the command finishes, discord.py has been successfully installed:

To run your bot script, go to where it is located, right click in an empty space in the folder, and press Open in Terminal :

Then type python3 (make sure to include the .py ):

Your bot is now running.
discord.py 2.3.2
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.
Key Features
- Modern Pythonic API using async and await .
- Proper rate limit handling.
- Optimised in both speed and memory.
Installing
Python 3.8 or higher is required
To install the library without full voice support, you can just run the following command:
python3 -m pip install -U discord.py py -3 -m pip install -U discord.py
Otherwise to get voice support you should run the following command:
python3 -m pip install -U py -3 -m pip install -U discord.pyTo install the development version, do the following:
$ git clone https://github.com/Rapptz/discord.py discord.py python3 -m pip install -U .
Optional Packages
- PyNaCl (for voice support)
Please note that when installing voice support on Linux, you must install the following packages via your favourite package manager (e.g. apt , dnf , etc) before running the above commands:
- libffi-dev (or libffi-devel on some systems)
- python-dev (e.g. python3.8-dev for Python 3.8)
Quick Example
Bot Example
You can find more examples in the examples directory.
Links
- Documentation
- Official Discord Server
- Discord API
