Skip to main content
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-api

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

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

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

# Windows
py -3 -m pip install -U discord-py-api[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.6-dev for Python 3.6)

Quick Example

import discord
from botway import GetToken

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(GetToken())

Bot Example

import discord
from discord.ext import commands
from botway import GetToken

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(GetToken())

You can find more examples in the examples directory.

Metadata

Release files for discord-py-api 1.7.851

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discord-py-api 1.7.851
File Size Uploaded
discord-py-api-1.7.851.tar.gz 951.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for discord-py-api 1.7.851
File Interpreter ABI Platform
discord_py_api-1.7.851-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / discord-py-api-1.7.851.tar.gz

Download URL discord-py-api-1.7.851.tar.gz
Size 951.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6f21de787cc5e625c9c42764b84e6753f83256cc34845e28fef5dbefc6be2abb
BLAKE2b-256 checksum
How to use checksums
8f6e4838bd4e704a9b5625b3ee0cc9a8235b0841127dc88efd06dadc5e68d7db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / discord_py_api-1.7.851-py3-none-any.whl

Download URL discord_py_api-1.7.851-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
edc819c00235903dacdc40a8e26dbe5bcf8caf61022aa1ca43c578c93ea6b293
BLAKE2b-256 checksum
How to use checksums
0c73451389c5e21c4eb60ca7affba2508d8d8a6b48ce241fc2af107d5ce69dc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.7.851 This release

2 release files

1.7.85

2 release files

1.7.84

2 release files

1.7.83

2 release files

1.7.82

2 release files

1.7.68

2 release files

1.7.67

2 release files

1.7.66

2 release files

1.7.65

2 release files

1.7.64

2 release files

1.7.63

2 release files

1.7.62

2 release files

1.7.61

2 release files

1.7.59

2 release files

1.7.58

2 release files

1.7.57

2 release files

1.7.56

2 release files

1.7.8

2 release files

1.7.7

2 release files

1.7.6

2 release files

1.7.5

2 release files

1.7.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page