<p align="center">
<a href="https://nonebot.dev/"><img src="https://camo.githubusercontent.com/32db41bc55fa37e0d0085e4fd70e4e74fd34307f6bb4ebdad235bd1b0c8f4126/68747470733a2f2f6e6f6e65626f742e6465762f6c6f676f2e706e67" width="200" height="200" alt="nonebot"></a>
</p>
<div align="center">
# NoneBot-Adapter-Mirai
_✨ mirai-api-http v2 协议适配 ✨_
</div>
> [!NOTE]
> Mirai 及 mirai-api-http 现处于停滞更新状态
>
> 本项目仅为仍然使用 mirai-api-http 的用户提供支持
## 配置
修改 NoneBot 配置文件 `.env` 或者 `.env.*`。
### Driver
参考 [driver](https://nonebot.dev/docs/appendices/config#driver) 配置项,添加 `HTTPClient` 和 `WebSocketClient` 支持。
如:
```dotenv
DRIVER=~httpx+~websockets
```
或
```dotenv
DRIVER=~aiohttp
```
### MIRAI_CLIENTS
配置连接配置,如:
```dotenv
MIRAI_CLIENTS='
[
{
"host": "localhost",
"port": "8080",
"account": 1234567890,
"verify_key": "xxx"
}
]
'
```
`host` 与 `port` 为 mirai-api-http 服务的监听地址与端口,
`account` 为当前机器人的 QQ 号,
`verify_key` 为 mirai-api-http 的 `verifyKey`。
## 相关项目/鸣谢
- [mirai-api-http](https://github.com/project-mirai/mirai-api-http)
- [Ariadne](https://github.com/GraiaProject/Ariadne)
Raw data
{
"_id": null,
"home_page": "https://nonebot.dev/",
"name": "nonebot-adapter-mirai",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0.0,>=3.9.0",
"maintainer_email": null,
"keywords": "bot, qq, qqbot, mirai",
"author": null,
"author_email": "rf_tar_railt <rf_tar_railt@qq.com>, Mix <admin@yami.im>, yanyongyu <yyy@nonebot.dev>",
"download_url": "https://files.pythonhosted.org/packages/5a/f6/fd42434804fac915145501bf3f2b194518c737a5edff2aad23c303918ff1/nonebot_adapter_mirai-2.3.3.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <a href=\"https://nonebot.dev/\"><img src=\"https://camo.githubusercontent.com/32db41bc55fa37e0d0085e4fd70e4e74fd34307f6bb4ebdad235bd1b0c8f4126/68747470733a2f2f6e6f6e65626f742e6465762f6c6f676f2e706e67\" width=\"200\" height=\"200\" alt=\"nonebot\"></a>\n</p>\n\n<div align=\"center\">\n\n# NoneBot-Adapter-Mirai\n\n_\u2728 mirai-api-http v2 \u534f\u8bae\u9002\u914d \u2728_\n\n</div>\n\n> [!NOTE]\n> Mirai \u53ca mirai-api-http \u73b0\u5904\u4e8e\u505c\u6ede\u66f4\u65b0\u72b6\u6001\n> \n> \u672c\u9879\u76ee\u4ec5\u4e3a\u4ecd\u7136\u4f7f\u7528 mirai-api-http \u7684\u7528\u6237\u63d0\u4f9b\u652f\u6301\n\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\n```\n\n\u6216\n\n```dotenv\nDRIVER=~aiohttp\n```\n\n### MIRAI_CLIENTS\n\n\u914d\u7f6e\u8fde\u63a5\u914d\u7f6e\uff0c\u5982\uff1a\n\n```dotenv\nMIRAI_CLIENTS='\n[\n {\n \"host\": \"localhost\",\n \"port\": \"8080\",\n \"account\": 1234567890,\n \"verify_key\": \"xxx\"\n }\n]\n'\n```\n\n`host` \u4e0e `port` \u4e3a mirai-api-http \u670d\u52a1\u7684\u76d1\u542c\u5730\u5740\u4e0e\u7aef\u53e3\uff0c\n\n`account` \u4e3a\u5f53\u524d\u673a\u5668\u4eba\u7684 QQ \u53f7\uff0c\n\n`verify_key` \u4e3a mirai-api-http \u7684 `verifyKey`\u3002\n\n## \u76f8\u5173\u9879\u76ee/\u9e23\u8c22\n\n- [mirai-api-http](https://github.com/project-mirai/mirai-api-http)\n- [Ariadne](https://github.com/GraiaProject/Ariadne)\n",
"bugtrack_url": null,
"license": "AGPL-3.0-or-later",
"summary": "Mirai Api HTTP adapter for nonebot2",
"version": "2.3.3",
"project_urls": {
"Documentation": "https://nonebot.dev/",
"Homepage": "https://nonebot.dev/",
"Repository": "https://github.com/nonebot/adapter-mirai"
},
"split_keywords": [
"bot",
" qq",
" qqbot",
" mirai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1cb9a8fd039f2b3d15b25b4dd84ff99d2fedd74396aaa3ce26013a03c0163640",
"md5": "93386e8b386a181c465dd67215c6d5bc",
"sha256": "ccac6b430486fafb35c70661f8e576e733f784942bc4cd2b93ebf56030a6f50d"
},
"downloads": -1,
"filename": "nonebot_adapter_mirai-2.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "93386e8b386a181c465dd67215c6d5bc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.9.0",
"size": 47775,
"upload_time": "2024-08-31T14:07:30",
"upload_time_iso_8601": "2024-08-31T14:07:30.188128Z",
"url": "https://files.pythonhosted.org/packages/1c/b9/a8fd039f2b3d15b25b4dd84ff99d2fedd74396aaa3ce26013a03c0163640/nonebot_adapter_mirai-2.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5af6fd42434804fac915145501bf3f2b194518c737a5edff2aad23c303918ff1",
"md5": "ae9160159bfdba620ccfd74c1f981ae5",
"sha256": "4953875c368bfe66027bc34b7240bc99a8e129647372d5a61b2d55e0b6a9582e"
},
"downloads": -1,
"filename": "nonebot_adapter_mirai-2.3.3.tar.gz",
"has_sig": false,
"md5_digest": "ae9160159bfdba620ccfd74c1f981ae5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.9.0",
"size": 44021,
"upload_time": "2024-08-31T14:07:31",
"upload_time_iso_8601": "2024-08-31T14:07:31.814983Z",
"url": "https://files.pythonhosted.org/packages/5a/f6/fd42434804fac915145501bf3f2b194518c737a5edff2aad23c303918ff1/nonebot_adapter_mirai-2.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-31 14:07:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nonebot",
"github_project": "adapter-mirai",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nonebot-adapter-mirai"
}