Asynchronous Discord API Wrapper for Python
- Sane Handling of 429s
- User friendly interface
- Most Gateway events
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]
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
from discord.ext import commands
bot = commands.Bot(command_prefix='!')
@bot.command()
async def ping(ctx):
await ctx.send('pong!')
bot.run('my_bot_token')
The d.io discord server