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-py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | ae773d8f090418a5fe29272feacd39aa822da612181459f9b56fcddb2dc5837f |
|
| MD5 | 8676be5a95517f86829d21aff958f8bd |
|
| 布莱克2-256 | 28d41de167f4af5701facf415b61ff3a71e18e40724f2925bdfc28082da9e957 |