/acord

An API wrapper for discord

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

ACord

Documentation Status

A simple API wrapper for the discord API

License: GPL-3.0 License (see the LICENSE file for details) covers all files in the acord repository unless stated otherwise.

Features

  • Uses modern pythonic, await and async syntax
  • Flexible and customisable
  • Rate limit handling
  • Simple to modify, learn and contribute towards
  • Optimised in speed and memory

Installation

Python >=3.8 is required

Stable

# Linux/Mac OS
pip3 install -U acord

# Windows
pip install -U acord

Development

# Install directly from github

## Linux/Mac OS
pip3 install -U git+https://github.com/Mecha-Karen/acord

## Windows
pip install -U git+https://github.com/Mecha-Karen/acord

# From source
git clone https://github.com/Mecha-Karen/acord

## pip for windows
pip3 install .

Example

Client

from acord import Client, Message, Intents

class MyClient(Client):
    def __init__(self, *args, **kwargs) -> None:
        super().__init__(*args, **kwargs)

    async def on_message(self, message: Message) -> None:
        """ My on_message event handler! """

        if message.content.lower() == ".ping":
            return await message.channel.send(content="Pong!")

if __name__ == "__main__":
    client = MyClient(intents=Intents.ALL)

    client.run("Bot Token")

Links