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.5.3.tar.gz
(29.6 kB
view details)
Built Distribution
File details
Details for the file nonebot_adapter_qq-1.5.3.tar.gz
.
File metadata
- Download URL: nonebot_adapter_qq-1.5.3.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e20dd4c080312131c1ea057a3c798024bac3d0b9c68778ac9a21601aa0ff74e0 |
|
MD5 | 40db905b75a12ab7c27c733d38897106 |
|
BLAKE2b-256 | 96aa50260a4f80cae88e206f049255770a0ea5bddae2e187ae8daeaa2cc1c884 |
File details
Details for the file nonebot_adapter_qq-1.5.3-py3-none-any.whl
.
File metadata
- Download URL: nonebot_adapter_qq-1.5.3-py3-none-any.whl
- Upload date:
- Size: 33.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cf15e25be877ba8ca715b212e909dce8b49852aeb52b20bca596de8ef7afe18 |
|
MD5 | 5b6ef5b08be29bf5570e63fec1e45972 |
|
BLAKE2b-256 | 1fc614f480365372944c5c47d4172822e9088ae5edd2e4488502ed811c917ef4 |