feat: Custom mirai verify key support

This commit is contained in:
LWR
2023-08-08 20:52:44 +08:00
parent 43bf411ee1
commit ba48185f99
2 changed files with 5 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ class Bot(BaseModel):
self.__bot = Ariadne(
connection=AriadneConfig(
self.qq,
"StarBot",
config.get('MIRAI_KEY'),
HttpClientConfig(host=f"http://{config.get('MIRAI_HOST')}:{config.get('MIRAI_PORT')}"),
WebsocketClientConfig(host=f"http://{config.get('MIRAI_HOST')}:{config.get('MIRAI_PORT')}"),
),

View File

@@ -28,10 +28,12 @@ DEFAULT_CONFIG = {
# MySQL 数据库名
"MYSQL_DB": "starbot",
# Mirai API HTTP 及 Websocket 地址
# Mirai API HTTP 连接地址
"MIRAI_HOST": "localhost",
# Mirai API HTTP 及 Websocket 端口
# Mirai API HTTP 连接端口
"MIRAI_PORT": 7827,
# Mirai API HTTP Key
"MIRAI_KEY": "StarBot",
# 登录 B 站账号所需 Cookie 数据 ( 不登录账号将有部分功能不可用 ) 各字段获取方式查看https://bot.starlwr.com/depoly/document
"SESSDATA": None,