Discord.py is a Python library that lets you build bots and automated tools for Discord, the popular chat platform. An API wrapper (what this library is) handles all the low-level communication with Discord's servers so you can focus on what your bot actually does, rather than figuring out how to talk to Discord's systems. Using discord.py, a developer can write a few lines of Python to create a bot that listens for messages, responds to commands, manages server members, and more. The code examples in the README show how simple this is: a bot that replies "pong" when someone types "ping" takes about 10 lines of code. The library handles rate limiting (Discord's rules about how fast you can send requests) and is designed to work asynchronously, meaning it can respond to many events at once without slowing down. The library supports an optional voice feature (for bots that play audio in voice channels) through an additional package. It requires Python 3.8 or higher and is installed via pip, Python's standard package installer. Discord.py is aimed at Python developers who want to automate tasks on Discord servers, building moderation bots, game bots, music players, notification systems, and similar tools.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.