Skip to main content

discord.aio is an asynchronous Discord API wrapper for asyncio and python

Project description

PyPI version Python version Module status License Discord Documentation Status

discord.aio is an asynchronous Discord API wrapper

Currently under very early development

Python 3.6+ only.

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 asyncio
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['DISCORD_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}')

    bot.run()

Here you can find a more extensive example.

TODO

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.aio-0.3.1.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

discord.aio-0.3.1-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file discord.aio-0.3.1.tar.gz.

File metadata

  • Download URL: discord.aio-0.3.1.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for discord.aio-0.3.1.tar.gz
Algorithm Hash digest
SHA256 bd6b3991de23a30d06974ab012d47d4fe1ed9ab9dfcb61a5cc981cc82cfd5ecf
MD5 637c112f787eaf2e32e9b96528daf41b
BLAKE2b-256 8c584bc21d018f718d61e618ff55ebda143b88df43e21109e4436e0f2c97e10c

See more details on using hashes here.

File details

Details for the file discord.aio-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: discord.aio-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for discord.aio-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 36483819287883960df7ab634d23cba789e4995e083e9391b334c56c37550f46
MD5 95afeb2d6caca2b7d1bca901467f475e
BLAKE2b-256 eb6cc8708bfdc21c9bdac3924c28376af7e6d998841be079465ffa18fc358da0

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