← Back to DAGDA | Support | Source: https://github.com/Pycord-Development/pycord
Skip to content
Pycord-DevelopmentPublic

About

Pycord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3.0k stars

Watchers

31 watching

Forks

Repository files navigation

Pycord

Pycord is a modern, easy to use, feature-rich, and async-ready API wrapper for Discord written in Python.

PyPI version info PyPI supported Python versions PyPI downloads Latest release Discord server invite GitHub Sponsors

Key Features

  • Modern Pythonic API using async and await.
  • Proper rate limit handling.
  • Optimised for both speed and memory usage.
  • Full application API support.

Installing

Pycord supports Python 3.10 - 3.14.

To install the base library, run the following command:

# Linux/macOS
$ python3 -m pip install -U py-cord

# Windows
$ py -3 -m pip install -U py-cord

Otherwise, to install optional packages for full voice support or speedup, run the following command(s):

# Linux/macOS
$ python3 -m pip install -U "py-cord[voice]"
$ python3 -m pip install -U "py-cord[speed]"

# Windows
$ py -3 -m pip install -U py-cord[voice]
$ py -3 -m pip install -U py-cord[speed]

To clone and install the development version, do the following:

$ git clone https://github.com/Pycord-Development/pycord
$ cd pycord
$ python3 -m pip install -U .

Or, to install the development version directly from the repository:

# Linux/macOS
$ python3 -m pip install "py-cord @ git+https://github.com/Pycord-Development/pycord"

# Windows
$ py -3 -m pip install "py-cord @ git+https://github.com/Pycord-Development/pycord"

Pycord is managed with uv. If you want to contribute to Pycord, refer to CONTRIBUTING.md for more information.

Optional Packages

Please note that while installing voice support on Linux, you must install the following packages via your preferred 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.14-dev for Python 3.14)

Quick Example

import discord

bot = discord.Bot()

@bot.slash_command()
async def hello(ctx, name: str | None = None):
    name = name or ctx.author.name
    await ctx.respond(f"Hello {name}!")

@bot.user_command(name="Say Hi")
async def hi(ctx: discord.ApplicationContext, user: discord.User):
    await ctx.respond(f"{ctx.author.mention} says hi to {user.name}!")

bot.run(TOKEN)

You can find more code examples in the examples directory.

⚠️ Warning: Make sure you do not reveal your bot token to anyone as it grants access to your bot.

Useful Links

Translations

Translation Status

Crowdin | Agile localization for tech companies

About

Pycord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3.0k stars

Watchers

31 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages