Skip to main content

Mirai Api HTTP adapter for nonebot2

Project description

nonebot

NoneBot-Adapter-Mirai

✨ mirai-api-http v2 协议适配 ✨

[!NOTE] Mirai 及 mirai-api-http 现处于停滞更新状态

本项目仅为仍然使用 mirai-api-http 的用户提供支持

配置

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

Driver

参考 driver 配置项,添加 HTTPClientWebSocketClient 支持。

如:

DRIVER=~httpx+~websockets

DRIVER=~aiohttp

MIRAI_CLIENTS

配置连接配置,如:

MIRAI_CLIENTS='
[
  {
    "host": "localhost",
    "port": "8080",
    "account": 1234567890,
    "verify_key": "xxx"
  }
]
'

hostport 为 mirai-api-http 服务的监听地址与端口,

account 为当前机器人的 QQ 号,

verify_key 为 mirai-api-http 的 verifyKey

相关项目/鸣谢

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_mirai-2.3.1.tar.gz (44.0 kB view hashes)

Uploaded Source

Built Distribution

nonebot_adapter_mirai-2.3.1-py3-none-any.whl (47.7 kB view hashes)

Uploaded Python 3

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