discord.aio is an asynchronous Discord API wrapper for asyncio and python
Project description
discord.aio is an asynchronous Discord API wrapper
Currently under very early development
Python 3.6+ only.
Read this readme with a cool theme here: ryozuki.github.io/discord.aio/
Documentation
You can find the module documentation here: documentation
Installation
With pip:
pip3 install discord.aio
From source:
git clone https://github.com/Ryozuki/discord.aio && cd discord.aio && pip3 install .
Local development
git clone https://github.com/Ryozuki/discord.aio
cd discord.aio && pip3 install -e .
Example bot
import os
import logging
from discordaio import DiscordBot
logging.basicConfig(
level='DEBUG', format='%(asctime)s - %(name)s - %(levelname)s: %(message)s')
logger = logging.getLogger('my_lovely_bot')
if __name__ == '__main__':
TOKEN = os.environ['PYDISCORD_TEST_TOKEN']
bot = DiscordBot(TOKEN)
@bot.event()
async def on_ready():
logger.info('Connected!')
logger.info(f'My username is {bot.user}')
@bot.event('on_message') # You can also use a custom function name.
async def foo_bar(message):
logger.info(f'{message.author}: {message.content}')
Here you can find a more extensive example.
You can also check the documentation for detailed explanation on how the module works.
TODO
Handle ISO8601 timestamp
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for discord.aio-0.1.7.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b157d3443bb0e1aa0e9858c19d15e6f866cc42325be9b9d06d8652c315c815f |
|
MD5 | 09c90d7fdae33a4ffc7c08fc0d5fe3d0 |
|
BLAKE2b-256 | 035bf804bd4ae2a45dcc52642904f0af8270d3632d3056fa4d7da12ad9637a8d |