Skip to main content

Asynchronous Discord API Wrapper For Python

Project description

Asynchronous Discord API Wrapper for Python

Features

  • Sane Handling of 429s
  • User friendly interface

Installing

To Install discord.io Just run the following command:

pip install discord.io

To install our speed requirements just run the following command:

pip install discord.io[speed]

For voice support run the following command:

pip install discord.io[voice]

Examples

This is a quick usecase example for the library!

import discord

client = discord.Client()

@client.event
async def on_ready():
    print('ready!')

@client.slash_command()
async def ping(interaction):
    await interaction.respond('pong!')

client.run('my_bot_token')

This is another example but with a prefixed command

import discord

client = discord.Client()

@client.event
async def on_ready():
    print('ready!')

@client.event
async def on_message(msg):
    if msg.author.bot:
        return
    
    if msg.content.startswith('!ping'):
        await msg.send('Pong!')

client.run('my_bot_token')

Useful Links

The discord.io discord server

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discord.io-0.8.2.tar.gz (532.3 kB view details)

Uploaded Source

File details

Details for the file discord.io-0.8.2.tar.gz.

File metadata

  • Download URL: discord.io-0.8.2.tar.gz
  • Upload date:
  • Size: 532.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for discord.io-0.8.2.tar.gz
Algorithm Hash digest
SHA256 fc8a87ab70add2edf9847036ffadd43d88869d46394254bcebb7b17aa824e12d
MD5 def195e0bad8ce80a79f63ac05381fb0
BLAKE2b-256 6ed13f310854667d34a7c91bf90fa4c2bf48afef25eac7ab6b40d35a96d066e5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page