Skip to main content

DanBotHosting API 的 Python 包装器

项目描述

danbot-hosting-py

DanBot Hosting API 的 Python API 包装器

安装

对于 Windows:

pip install danbot-hosting-py

适用于 Linux/MacOS

pip3 install danbot-hosting-py

快速示例

from discord.ext import commands
from danbot_api import DanBotClient


bot = commands.Bot(command_prefix='>', description="This is a Helper Bot")


@bot.event
async def on_ready():
    DanBotClient(bot, key="your_dbh_key", autopost=True)
    print('Bot is Online')

@bot.event
async def on_dbh_post(data):
    print("Posted Bot Data to DBH. Data Posted:")
    print(data)

@bot.command()
async def ping(ctx):
    await ctx.send('pong!')

bot.run("your bot's token here")

常问问题

如何获得 API 密钥?

转到discord 服务器DBH!ApiKey并在相应的文本频道中使用该命令!

我的模块有问题

您可以在 Github 的问题部分发帖或在 Discord 上给我发消息!(牧友^#4707)

链接

项目详情


下载文件

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

源分布

danbot-hosting-py-1.0.tar.gz (5.3 kB 查看哈希)

已上传 source

内置分布

danbot_hosting_py-1.0-py3-none-any.whl (6.3 kB 查看哈希

已上传 py3