--- id: py-cord version: "2.8.1" license: MIT license_treatment: permissive maintenance: active --- # py-cord — A Python wrapper for the Discord API License: permissive · Maintenance: active · Downloads: 540.6K/mo ## What it is and what it does py-cord is a Python library that wraps Discord's REST and WebSocket APIs, allowing you to write Discord bots using async/await syntax. It provides both modern slash commands and traditional prefix-based commands, with built-in rate limit handling and memory optimization. The library depends on aiohttp for HTTP requests and typing_extensions for type hints, and is designed to work with Python 3.10 through 3.14. You use it by importing the module, instantiating a Bot object, decorating handler functions with command decorators, and calling bot.run() with your bot token. It handles the WebSocket connection, message routing, and command parsing automatically. Optional extras like voice support and performance speedups are available but require additional packages. Use it for: - Build a Discord bot with slash commands that responds to user interactions in real time. - Create a moderation bot that monitors messages and enforces server rules using prefix commands. - Develop a music bot that connects to voice channels and streams audio with optional voice support. - Automate server tasks like role assignment, welcome messages, or scheduled announcements. - Integrate external APIs or databases into Discord workflows via bot commands. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. py-cord is an async Python wrapper for the Discord API that lets you build Discord bots with modern async/await syntax, handling rate limits and providing both slash commands and traditional prefix-based commands. Yes. py-cord is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive MIT license. It is suitable for anyone building Discord bots in Python who wants modern async syntax and a well-supported library. ## Install pip install py-cord uv add py-cord poetry add py-cord ## Installing py-cord Before you install: Low friction: pure Python wheel with only two runtime dependencies (aiohttp and typing_extensions). Active maintenance with a recent release 20 days old and steady commit activity. Supports Python 3.10–3.14. License in practice: MIT license is permissive; you can use py-cord in commercial and private projects with minimal restrictions, provided you include the license notice. Quickstart: pip install py-cord import py_cord bot = py_cord.Bot() @bot.slash_command() async def hello(ctx, name: str = None): name = name or ctx.author.name await ctx.respond(f"Hello {name}!") bot.run("your_token_here") Requires Python 3.10 or higher. Voice support requires optional system packages on Linux and additional Python packages. Verify before relying: - Whether the package maintains API compatibility with Discord API changes over time. - Performance characteristics under high-concurrency scenarios. - Specific system package names required for voice support on different Linux distributions. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 540.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags discord bot library python, discord api wrapper async, python discord slash commands, discord bot framework, async discord client, discord bot development, python discord library, discord-bot, async-api, api-wrapper [View on SkillFed](https://skillfed.io/packages/py-cord) · [View on PyPI](https://pypi.org/project/py-cord/)