QQ adapter for nonebot2
Project description
NoneBot-Adapter-QQ
✨ QQ 协议适配 ✨
配置
修改 NoneBot 配置文件 .env
或者 .env.*
。
Driver
参考 driver 配置项,添加 HTTPClient
和 WebSocketClient
支持。
如:
DRIVER=~httpx+~websockets
DRIVER=~aiohttp
QQ_IS_SANDBOX
是否为沙盒模式,默认为 False
。
QQ_IS_SANDBOX=true
QQ_BOTS
配置机器人帐号 id
token
secret
,intent 需要根据机器人类型以及需要的事件进行配置。
Intent
以下为所有 Intent 配置项以及默认值:
{
"guilds": true,
"guild_members": true,
"guild_messages": false,
"guild_message_reactions": true,
"direct_message": false,
"open_forum_event": false,
"audio_live_member": false,
"c2c_group_at_messages": false,
"interaction": false,
"message_audit": true,
"forum_event": false,
"audio_action": false,
"at_messages": true
}
示例
私域频道机器人示例
QQ_BOTS='
[
{
"id": "xxx",
"token": "xxx",
"secret": "xxx",
"intent": {
"guild_messages": true,
"at_messages": false
}
}
]
'
公域群机器人示例
QQ_BOTS='
[
{
"id": "xxx",
"token": "xxx",
"secret": "xxx",
"intent": {
"c2c_group_at_messages": true
}
}
]
'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nonebot_adapter_qq-1.1.2.tar.gz
(27.2 kB
view details)
Built Distribution
File details
Details for the file nonebot_adapter_qq-1.1.2.tar.gz
.
File metadata
- Download URL: nonebot_adapter_qq-1.1.2.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7780158228000d44d462009653ef71f2486474b416e92f51487f26d7b952bd61 |
|
MD5 | 6b3d43d535c9bbe69e8d935d7bf9f18d |
|
BLAKE2b-256 | 1e5154d0872b8963ea07654d6361901978bb61d8c87f01e7f15fbeac5a2cd24f |
File details
Details for the file nonebot_adapter_qq-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: nonebot_adapter_qq-1.1.2-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39e6ab0fffce12476e89713faf598f15d703c12970ebf908d285b756eb481258 |
|
MD5 | c75b1322dd49dbf57529af1c3eaf9078 |
|
BLAKE2b-256 | 034d144810262194e5c6ddcae3e0fda5da14a53bbe3c07e08facdf47a841047a |