Skip to main content

Discord Gateway API 和 Discord REST API 的异步 Python API 包装器。

项目描述

解码

Discode 是 Discord REST 和 Gateway API 的异步 Python API 包装器。这个项目的灵感来自Discord.py,可能包含类似的功能。

基本示例用法

import discode

client = discode.Client()

# the coroutine under the decorator
# can have any name you wish to use
@client.on_event("ready")
async def ready():
    print(f"{client.user} is ready!")

@client.on_event("message")
async def message(message: discode.Message):
    content = message.content
    if content.startswith("?hi"):
        await message.channel.send("Hiii!!!")

client.start("YOUR-TOKEN-HERE")

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

Discode.py-1.1.1.tar.gz (17.8 kB 查看哈希

已上传 source

内置发行版

Discode.py-1.1.1-py3-none-any.whl (22.2 kB 查看哈希

已上传 py3

DisCode.py-1.1.1-py3-none-any.whl (22.3 kB 查看哈希

已上传 py3