A modern API wrapper for Discord.
Project description
A modern API wrapper for Discord.
Installation
pip install aiocord
Features
Complete: Implements the entirety of Discord’s services.
Asynchronous: Written in pure asyncio for native parallelism.
Modular: Any component (such as HTTP) can be used in isolation.
Ergonomic: Comes with extreme purpose-driven data reception and cacehing.
Interactive: Supports slash-commands and related utilities out of the box.
Example
Create a widget/__init__.py file.
import aiocord
@aiocord.widget.callback(aiocord.events.CreateMessage)
async def handle(info, event):
if (message := event.message).author.id == info.client.cache.user.id:
return
await info.client.create_message(message.channel_id, content = f'{message.author.mention()} said {message.content}!')
And run the following in your terminal:
aiocord --token <TOKEN> start widget
This is a simple example to get you started in seconds, but the library covers a vast wealth tools to fit any scenario.
Check out the Documentation’s Examples section for more, such as how to use Commands and Interactions.
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
Built Distribution
Hashes for aiocord-2.0.0.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 372866e704f3a97ede3baf29c2622a4ba0d13f8468c7b2e1bc71aab250ca14de |
|
MD5 | b8fc8c3ddc8fe2be634d398f27c2afc3 |
|
BLAKE2b-256 | 679a2269fdb06493859449e3a36adb530ed175d196069327533795cf27995ea0 |