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

Uploaded Source

Built Distribution

nonebot_adapter_qq-1.5.2-py3-none-any.whl (33.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_adapter_qq-1.5.2.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for nonebot_adapter_qq-1.5.2.tar.gz
Algorithm Hash digest
SHA256 bd8ed6f6b90fafc0112d4a1d1bca9b53c6204673eef348c0e851f7d9fc9821de
MD5 ae4ee002b4397eb85476d222ad75cc91
BLAKE2b-256 3014e89ce47195541a742fd15aea543e78148f52430c32e33d417447067a7f98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_adapter_qq-1.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c5843b7a243286d9b35520e2d54d4d341663fbff4d9d7946bc4b6b24fea792f0
MD5 9e598eeccb23072bb47e92764555c47d
BLAKE2b-256 f719daae508bdd2ab6ef71700e6e90800a51f3fb2225e948509a6e5f0b211c56

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