https://github.com/nonebot/adapter-mirai
Mirai Api HTTP adapter for nonebot2
https://github.com/nonebot/adapter-mirai
Last synced: 11 months ago
JSON representation
Mirai Api HTTP adapter for nonebot2
- Host: GitHub
- URL: https://github.com/nonebot/adapter-mirai
- Owner: nonebot
- License: agpl-3.0
- Created: 2021-12-06T13:53:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-31T14:06:54.000Z (over 1 year ago)
- Last Synced: 2024-10-29T22:01:27.575Z (over 1 year ago)
- Language: Python
- Size: 111 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NoneBot-Adapter-Mirai
_✨ mirai-api-http v2 协议适配 ✨_
> [!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)