Skip to main content

nonebot-adapter-qq

NoneBot-Adapter-QQ

✨ QQ 协议适配 ✨

配置

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

Driver

如果使用 WebSocket 连接方式,请参考 driver 配置项,添加 HTTPClient 和 WebSocketClient 支持。如:

DRIVER=~httpx+~websockets
DRIVER=~aiohttp

如果使用 WebHook 连接方式,则添加 ASGIServer 支持。如:

DRIVER=~fastapi

QQ_IS_SANDBOX

是否为沙盒模式,默认为 False。

QQ_IS_SANDBOX=true

QQ_BOTS

配置机器人帐号 id secret,intent 需要根据机器人类型以及需要的事件进行配置。

Webhook / WebSocket

通过配置项 use_websocket 来选择是否启用 WebSocket 连接,当前默认为 True。如果关闭 WebSocket 连接方式,则可以通过 WebHook 方式来连接机器人,请在 QQ 开放平台中配置机器人回调地址:https://host:port/qq/webhook。

Intent

Intent 仅对 WebSocket 连接方式生效。以下为所有 Intent 配置项以及默认值:

{
  // 频道事件
  "guilds": true,
  // 频道成员事件
  "guild_members": true,
  // 频道消息事件
  "guild_messages": false,
  // 频道消息表态事件
  "guild_message_reactions": true,
  // 频道私信事件
  "direct_message": false,
  // 频道公域论坛事件
  "open_forum_event": false,
  // 频道音频或直播成员事件
  "audio_live_member": false,
  // 群成员变更事件
  "group_members": false,
  // 私聊与群聊消息事件
  "c2c_group_at_messages": false,
  // 互动事件
  "interaction": false,
  // 频道消息审核事件
  "message_audit": true,
  // 频道私域论坛事件
  "forum_event": false,
  // 频道音频操作事件
  "audio_action": false,
  // 频道@机器人消息事件
  "at_messages": true
}

示例

私域频道机器人示例

QQ_BOTS='
[
  {
    "id": "xxx",
    "secret": "xxx",
    "intent": {
      "guild_messages": true,
      "at_messages": false
    },
    "use_websocket": false
  }
]
'

公域群机器人示例

QQ_BOTS='
[
  {
    "id": "xxx",
    "secret": "xxx",
    "intent": {
      "c2c_group_at_messages": true,
      "group_members": true
    },
    "use_websocket": false
  }
]
'

Metadata

Release files for nonebot-adapter-qq 1.7.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-adapter-qq 1.7.4
File Size Uploaded Provenance Actions
nonebot_adapter_qq-1.7.4.tar.gz 37.4 kB Without provenance Details for nonebot_adapter_qq-1.7.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-adapter-qq 1.7.4
File Interpreter ABI Platform Actions
nonebot_adapter_qq-1.7.4-py3-none-any.whl Python 3 none any Details for nonebot_adapter_qq-1.7.4-py3-none-any.whl

Total release size: 78.4 kB

Release files / nonebot_adapter_qq-1.7.4.tar.gz

Download URL nonebot_adapter_qq-1.7.4.tar.gz
Size 37.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7fc87a42a6728a31bb64fa4b705a45afe5b09be4fdc948e180d449b1ef026c33
BLAKE2b-256 checksum
How to use checksums
0b37dc2e2c1773ef88c21198da6df27b072a78620e140a6376d780edaf2f3761
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nonebot_adapter_qq-1.7.4-py3-none-any.whl

Download URL nonebot_adapter_qq-1.7.4-py3-none-any.whl
Size 41.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12f3f69fd59aa93b194995270d75d647faed5bb7b842f1dd375fcb6db7da7342
BLAKE2b-256 checksum
How to use checksums
d853489b1595cd7c242c8e87af973232530c55faf180d3fa9967db4e30acbb62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for nonebot-adapter-qq 1.7.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.7.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page