Skip to main content

QQ adapter for nonebot2

Project description

nonebot-adapter-qq

NoneBot-Adapter-QQ

✨ QQ 协议适配 ✨

配置

修改 NoneBot 配置文件 .env 或者 .env.*

Driver

参考 driver 配置项,添加 HTTPClientWebSocketClient 支持。

如:

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


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.3.3.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

nonebot_adapter_qq-1.3.3-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_adapter_qq-1.3.3.tar.gz.

File metadata

  • Download URL: nonebot_adapter_qq-1.3.3.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for nonebot_adapter_qq-1.3.3.tar.gz
Algorithm Hash digest
SHA256 6b1aa14a8b61f241ec3ef0bd68041766aff393b51ee2b111b78336a1f532f4d5
MD5 2bc50bc07229d50fcd44d7858c028e19
BLAKE2b-256 361d4f33bc1ccc0cf63d2e3d9121b3303da2750f631ef916f6509fea5b0ff895

See more details on using hashes here.

File details

Details for the file nonebot_adapter_qq-1.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_adapter_qq-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ab1c593f6f2ac3df844814fed6074ceb12d71827fcd71c6dc135f9e3a86b4a9e
MD5 889dbac481a7d56ca00118a203e98293
BLAKE2b-256 d967bbaefa15daca0a728658da5faf140e8177d0938295b8cbbe6cb48a0adce9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page