Skip to main content

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


Download files

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

Source Distribution

aiocord-2.1.0.tar.gz (109.4 kB view details)

Uploaded Source

Built Distribution

aiocord-2.1.0-py3-none-any.whl (98.6 kB view details)

Uploaded Python 3

File details

Details for the file aiocord-2.1.0.tar.gz.

File metadata

  • Download URL: aiocord-2.1.0.tar.gz
  • Upload date:
  • Size: 109.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for aiocord-2.1.0.tar.gz
Algorithm Hash digest
SHA256 95b4a96eaf8cd14ffdfb478a295f391d1dbebe5791893a505d530b57e6567cd2
MD5 cf6d8e5db728c6e3d5aa875525e1ce55
BLAKE2b-256 168e491672cc8c15aeaec77bd0f826e1685391dccf86d2c0a6add15ae847342e

See more details on using hashes here.

File details

Details for the file aiocord-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: aiocord-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 98.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for aiocord-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6891436698190254e3652da76d8451568e046e16956768edbeabdd2c4a700859
MD5 20a89e8ae11b00c8a7713c25a0677a9f
BLAKE2b-256 e3af45abf698ac5d80603c429d763c6d59ce0421be6d390a5cae6b75da41a738

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