Skip to content

Botpy 文档Better QQBot Python SDK docs

QQ Bot Python SDK

快速上手

python
import botpy
from botpy.message import Message

class MyClient(botpy.Client):
    async def on_at_message_create(self, message: Message):
        await message.reply(content=f"收到你的@消息了: {message.content}")

intents = botpy.Intents(public_guild_messages=True)
client = MyClient(intents=intents)
client.run(appid="你的appid", secret="你的secret")

安装

bash
pip install qq-botpy