nonebot-adapter-qq


Namenonebot-adapter-qq JSON
Version 1.5.3 PyPI version JSON
download
home_pagehttps://github.com/nonebot/adapter-qq
SummaryQQ adapter for nonebot2
upload_time2024-10-24 08:00:43
maintainerNone
docs_urlNone
authoryanyongyu
requires_python<4.0,>=3.9
licenseMIT
keywords bot qq qqbot qqguild
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://nonebot.dev/"><img src="https://raw.githubusercontent.com/nonebot/adapter-qq/master/assets/logo.png" width="200" height="200" alt="nonebot-adapter-qq"></a>
</p>

<div align="center">

# NoneBot-Adapter-QQ

_✨ QQ 协议适配 ✨_

</div>

## 配置

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

### Driver

参考 [driver](https://nonebot.dev/docs/appendices/config#driver) 配置项,添加 `HTTPClient` 和 `WebSocketClient` 支持。

如:

```dotenv
DRIVER=~httpx+~websockets
DRIVER=~aiohttp
```

### QQ_IS_SANDBOX

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

```dotenv
QQ_IS_SANDBOX=true
```

### QQ_BOTS

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

#### Intent

以下为所有 Intent 配置项以及默认值:

```json
{
  "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
}
```

#### 示例

私域频道机器人示例

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

公域群机器人示例

```dotenv
QQ_BOTS='
[
  {
    "id": "xxx",
    "token": "xxx",
    "secret": "xxx",
    "intent": {
      "c2c_group_at_messages": true
    }
  }
]
'
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nonebot/adapter-qq",
    "name": "nonebot-adapter-qq",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "bot, qq, qqbot, qqguild",
    "author": "yanyongyu",
    "author_email": "yyy@nonebot.dev",
    "download_url": "https://files.pythonhosted.org/packages/96/aa/50260a4f80cae88e206f049255770a0ea5bddae2e187ae8daeaa2cc1c884/nonebot_adapter_qq-1.5.3.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <a href=\"https://nonebot.dev/\"><img src=\"https://raw.githubusercontent.com/nonebot/adapter-qq/master/assets/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot-adapter-qq\"></a>\n</p>\n\n<div align=\"center\">\n\n# NoneBot-Adapter-QQ\n\n_\u2728 QQ \u534f\u8bae\u9002\u914d \u2728_\n\n</div>\n\n## \u914d\u7f6e\n\n\u4fee\u6539 NoneBot \u914d\u7f6e\u6587\u4ef6 `.env` \u6216\u8005 `.env.*`\u3002\n\n### Driver\n\n\u53c2\u8003 [driver](https://nonebot.dev/docs/appendices/config#driver) \u914d\u7f6e\u9879\uff0c\u6dfb\u52a0 `HTTPClient` \u548c `WebSocketClient` \u652f\u6301\u3002\n\n\u5982\uff1a\n\n```dotenv\nDRIVER=~httpx+~websockets\nDRIVER=~aiohttp\n```\n\n### QQ_IS_SANDBOX\n\n\u662f\u5426\u4e3a\u6c99\u76d2\u6a21\u5f0f\uff0c\u9ed8\u8ba4\u4e3a `False`\u3002\n\n```dotenv\nQQ_IS_SANDBOX=true\n```\n\n### QQ_BOTS\n\n\u914d\u7f6e\u673a\u5668\u4eba\u5e10\u53f7 `id` `token` `secret`\uff0cintent \u9700\u8981\u6839\u636e\u673a\u5668\u4eba\u7c7b\u578b\u4ee5\u53ca\u9700\u8981\u7684\u4e8b\u4ef6\u8fdb\u884c\u914d\u7f6e\u3002\n\n#### Intent\n\n\u4ee5\u4e0b\u4e3a\u6240\u6709 Intent \u914d\u7f6e\u9879\u4ee5\u53ca\u9ed8\u8ba4\u503c\uff1a\n\n```json\n{\n  \"guilds\": true,\n  \"guild_members\": true,\n  \"guild_messages\": false,\n  \"guild_message_reactions\": true,\n  \"direct_message\": false,\n  \"open_forum_event\": false,\n  \"audio_live_member\": false,\n  \"c2c_group_at_messages\": false,\n  \"interaction\": false,\n  \"message_audit\": true,\n  \"forum_event\": false,\n  \"audio_action\": false,\n  \"at_messages\": true\n}\n```\n\n#### \u793a\u4f8b\n\n\u79c1\u57df\u9891\u9053\u673a\u5668\u4eba\u793a\u4f8b\n\n```dotenv\nQQ_BOTS='\n[\n  {\n    \"id\": \"xxx\",\n    \"token\": \"xxx\",\n    \"secret\": \"xxx\",\n    \"intent\": {\n      \"guild_messages\": true,\n      \"at_messages\": false\n    }\n  }\n]\n'\n```\n\n\u516c\u57df\u7fa4\u673a\u5668\u4eba\u793a\u4f8b\n\n```dotenv\nQQ_BOTS='\n[\n  {\n    \"id\": \"xxx\",\n    \"token\": \"xxx\",\n    \"secret\": \"xxx\",\n    \"intent\": {\n      \"c2c_group_at_messages\": true\n    }\n  }\n]\n'\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "QQ adapter for nonebot2",
    "version": "1.5.3",
    "project_urls": {
        "Documentation": "https://github.com/nonebot/adapter-qq#readme",
        "Homepage": "https://github.com/nonebot/adapter-qq",
        "Repository": "https://github.com/nonebot/adapter-qq"
    },
    "split_keywords": [
        "bot",
        " qq",
        " qqbot",
        " qqguild"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1fc614f480365372944c5c47d4172822e9088ae5edd2e4488502ed811c917ef4",
                "md5": "5b6ef5b08be29bf5570e63fec1e45972",
                "sha256": "9cf15e25be877ba8ca715b212e909dce8b49852aeb52b20bca596de8ef7afe18"
            },
            "downloads": -1,
            "filename": "nonebot_adapter_qq-1.5.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5b6ef5b08be29bf5570e63fec1e45972",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 33523,
            "upload_time": "2024-10-24T08:00:42",
            "upload_time_iso_8601": "2024-10-24T08:00:42.712511Z",
            "url": "https://files.pythonhosted.org/packages/1f/c6/14f480365372944c5c47d4172822e9088ae5edd2e4488502ed811c917ef4/nonebot_adapter_qq-1.5.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96aa50260a4f80cae88e206f049255770a0ea5bddae2e187ae8daeaa2cc1c884",
                "md5": "40db905b75a12ab7c27c733d38897106",
                "sha256": "e20dd4c080312131c1ea057a3c798024bac3d0b9c68778ac9a21601aa0ff74e0"
            },
            "downloads": -1,
            "filename": "nonebot_adapter_qq-1.5.3.tar.gz",
            "has_sig": false,
            "md5_digest": "40db905b75a12ab7c27c733d38897106",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 29570,
            "upload_time": "2024-10-24T08:00:43",
            "upload_time_iso_8601": "2024-10-24T08:00:43.741331Z",
            "url": "https://files.pythonhosted.org/packages/96/aa/50260a4f80cae88e206f049255770a0ea5bddae2e187ae8daeaa2cc1c884/nonebot_adapter_qq-1.5.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-24 08:00:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nonebot",
    "github_project": "adapter-qq",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nonebot-adapter-qq"
}
        
Elapsed time: 0.66268s