diff --git a/starbot/core/sender.py b/starbot/core/sender.py index f449bce..3defa4e 100644 --- a/starbot/core/sender.py +++ b/starbot/core/sender.py @@ -53,8 +53,8 @@ class Bot(BaseModel): connection=AriadneConfig( self.qq, "StarBot", - HttpClientConfig(host=f"http://localhost:{config.get('MIRAI_PORT')}"), - WebsocketClientConfig(host=f"http://localhost:{config.get('MIRAI_PORT')}"), + HttpClientConfig(host=f"http://{config.get('MIRAI_HOST')}:{config.get('MIRAI_PORT')}"), + WebsocketClientConfig(host=f"http://{config.get('MIRAI_HOST')}:{config.get('MIRAI_PORT')}"), ), log_config=LogConfig(log_level="DEBUG") ) diff --git a/starbot/utils/config.py b/starbot/utils/config.py index f2ca98a..c9e67ea 100644 --- a/starbot/utils/config.py +++ b/starbot/utils/config.py @@ -33,7 +33,9 @@ DEFAULT_CONFIG = { # MySQL 数据库名 "MYSQL_DB": "starbot", - # Mirai HTTP 及 Websocket 端口 + # Mirai API HTTP 及 Websocket 地址 + "MIRAI_HOST": "localhost", + # Mirai API HTTP 及 Websocket 端口 "MIRAI_PORT": 7827, # 登录 B 站账号所需 Cookie 数据 ( 不登录账号将有部分功能不可用 ) 各字段获取方式查看:https://bot.starlwr.com/depoly/document