discord-py 2.7.1


pip install discord-py

  Latest version

Released: Mar 03, 2026


Meta
Author: Rapptz
Requires Python: >=3.8

Classifiers

Development Status
  • 5 - Production/Stable

License
  • OSI Approved :: MIT License

Intended Audience
  • Developers

Natural Language
  • English

Operating System
  • OS Independent

Programming Language
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12

Topic
  • Internet
  • Software Development :: Libraries
  • Software Development :: Libraries :: Python Modules
  • Utilities

Typing
  • Typed
Discord server invite PyPI version info PyPI supported Python versions

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:

# Linux/macOS
python3 -m pip install -U discord.py

# Windows
py -3 -m pip install -U discord.py

Otherwise to get voice support you should run the following command:

# Linux/macOS
python3 -m pip install -U "discord.py[voice]"

# Windows
py -3 -m pip install -U discord.py[voice]

To install the development version, do the following:

$ git clone https://github.com/Rapptz/discord.py
$ cd discord.py
$ python3 -m pip install -U .[voice]

Optional Packages

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

import discord

class MyClient(discord.Client):
    async def on_ready(self):
        print('Logged on as', self.user)

    async def on_message(self, message):
        # don't respond to ourselves
        if message.author == self.user:
            return

        if message.content == 'ping':
            await message.channel.send('pong')

intents = discord.Intents.default()
intents.message_content = True
client = MyClient(intents=intents)
client.run('token')

Bot Example

import discord
from discord.ext import commands

intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='>', intents=intents)

@bot.command()
async def ping(ctx):
    await ctx.send('pong')

bot.run('token')

You can find more examples in the examples directory.

2.7.1 Mar 03, 2026
2.7.0 Feb 27, 2026
2.6.4 Oct 08, 2025
2.6.3 Aug 31, 2025
2.6.2 Aug 24, 2025
2.6.1 Aug 24, 2025
2.6.0 Aug 18, 2025
2.5.2 Mar 05, 2025
2.5.1 Mar 04, 2025
2.5.0 Feb 18, 2025
2.4.0 Jun 22, 2024
2.3.2 Aug 10, 2023
2.3.1 Jun 26, 2023
2.3.0 Jun 12, 2023
2.2.3 May 01, 2023
2.2.2 Mar 02, 2023
2.2.0 Feb 28, 2023
2.1.1 Feb 09, 2023
2.1.0 Nov 12, 2022
2.0.1 Aug 27, 2022
2.0.0 Aug 18, 2022
1.7.3 Jun 12, 2021
1.7.2 May 03, 2021
1.7.1 Apr 06, 2021
1.7.0 Apr 04, 2021
1.6.0 Jan 08, 2021
1.5.1 Oct 19, 2020
1.5.0 Sep 29, 2020
1.4.2 Sep 29, 2020
1.4.1 Aug 09, 2020
1.4.0 Aug 06, 2020
1.3.4 Jul 09, 2020
1.3.3 Apr 04, 2020
1.3.2 Feb 23, 2020
1.3.1 Jan 26, 2020
1.3.0 Jan 25, 2020
1.2.5 Nov 19, 2019
1.2.4 Oct 18, 2019
1.2.3 Jun 26, 2019
1.2.2 Jun 10, 2019
1.2.1 Jun 09, 2019
1.2.0 Jun 09, 2019
1.1.1 May 11, 2019
1.1.0 May 11, 2019
1.0.1 Apr 10, 2019
1.0.0 Apr 08, 2019
0.16.12 Oct 01, 2017
0.16.11 Aug 30, 2017
0.16.10 Aug 19, 2017
0.16.9 Aug 16, 2017
0.16.8 May 21, 2017
0.16.7 Feb 27, 2017
0.16.6 Feb 15, 2017
0.16.5 Jan 21, 2017
0.16.4 Jan 16, 2017
0.16.3 Jan 12, 2017
0.16.2 Jan 10, 2017
0.16.1 Jan 10, 2017
0.16.0 Dec 19, 2016
0.15.1 Nov 30, 2016
0.15.0 Nov 23, 2016
0.14.3 Nov 06, 2016
0.14.2 Nov 04, 2016
0.14.1 Nov 04, 2016
0.14.0 Nov 04, 2016
0.13.0 Sep 27, 2016
0.12.0 Sep 25, 2016
0.11.0 Jul 30, 2016
0.10.0 Jun 28, 2016
0.9.2 Jan 14, 2016
0.9.1 Dec 24, 2015
0.9.0 Nov 29, 2015
0.8.0 Oct 23, 2015
0.7.0 Oct 13, 2015
0.6.3 Oct 03, 2015
0.6.2 Oct 02, 2015
0.6.1 Sep 28, 2015
0.6.0 Sep 25, 2015
0.5.1 Sep 05, 2015
0.5.0 Sep 05, 2015
0.4.1 Aug 28, 2015
0.4.0 Aug 28, 2015
0.3.1 Aug 27, 2015
0.3.0 Aug 27, 2015
0.2.1 Aug 24, 2015
0.2.0 Aug 24, 2015
0.1.0 Aug 23, 2015

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
aiohttp (<4,>=3.7.4)
audioop-lts