{"id":20390304,"url":"https://github.com/nonebot/adapter-qq","last_synced_at":"2025-04-05T00:08:12.332Z","repository":{"id":40652637,"uuid":"441127283","full_name":"nonebot/adapter-qq","owner":"nonebot","description":"NoneBot2 QQ 适配器 / QQ adapter for nonebot2","archived":false,"fork":false,"pushed_at":"2024-04-14T03:42:02.000Z","size":919,"stargazers_count":183,"open_issues_count":2,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-14T06:49:43.950Z","etag":null,"topics":["qq","qq-bot","qq-guild"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nonebot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"open_collective":"nonebot","custom":["https://afdian.net/@nonebot"]}},"created_at":"2021-12-23T09:22:44.000Z","updated_at":"2024-04-16T05:38:01.211Z","dependencies_parsed_at":"2023-10-02T04:04:13.299Z","dependency_job_id":"65911cdc-fd2f-4fd3-b3f4-8d603ab93e6d","html_url":"https://github.com/nonebot/adapter-qq","commit_stats":{"total_commits":171,"total_committers":20,"mean_commits":8.55,"dds":"0.39181286549707606","last_synced_commit":"24929bb9952e540669ff77a795d71ec1fa28935a"},"previous_names":["nonebot/adapter-qq","nonebot/adapter-qqguild"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fadapter-qq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fadapter-qq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fadapter-qq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fadapter-qq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonebot","download_url":"https://codeload.github.com/nonebot/adapter-qq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266564,"owners_count":20910836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["qq","qq-bot","qq-guild"],"created_at":"2024-11-15T03:24:06.067Z","updated_at":"2025-04-05T00:08:12.301Z","avatar_url":"https://github.com/nonebot.png","language":"Python","funding_links":["https://opencollective.com/nonebot","https://afdian.net/@nonebot"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://nonebot.dev/\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nonebot/adapter-qq/master/assets/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot-adapter-qq\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# NoneBot-Adapter-QQ\n\n_✨ QQ 协议适配 ✨_\n\n\u003c/div\u003e\n\n## 配置\n\n修改 NoneBot 配置文件 `.env` 或者 `.env.*`。\n\n### Driver\n\n如果使用 WebSocket 连接方式，请参考 [driver](https://nonebot.dev/docs/appendices/config#driver) 配置项，添加 `HTTPClient` 和 `WebSocketClient` 支持。如：\n\n```dotenv\nDRIVER=~httpx+~websockets\nDRIVER=~aiohttp\n```\n\n如果使用 WebHook 连接方式，则添加 `ASGIServer` 支持。如：\n\n```dotenv\nDRIVER=~fastapi\n```\n\n### QQ_IS_SANDBOX\n\n是否为沙盒模式，默认为 `False`。\n\n```dotenv\nQQ_IS_SANDBOX=true\n```\n\n### QQ_BOTS\n\n配置机器人帐号 `id` `token` `secret`，intent 需要根据机器人类型以及需要的事件进行配置。\n\n#### Webhook / WebSocket\n\n通过配置项 `use_websocket` 来选择是否启用 WebSocket 连接，当前默认为 `True`。如果关闭 WebSocket 连接方式，则可以通过 WebHook 方式来连接机器人，请在 QQ 开放平台中配置机器人回调地址：`https://host:port/qq/webhook`。\n\n#### Intent\n\nIntent 仅对 WebSocket 连接方式生效。以下为所有 Intent 配置项以及默认值：\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#### 示例\n\n私域频道机器人示例\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    \"use_websocket\": false\n  }\n]\n'\n```\n\n公域群机器人示例\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    \"use_websocket\": false\n  }\n]\n'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fadapter-qq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonebot%2Fadapter-qq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fadapter-qq/lists"}