Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在配置文件中保存 HTTP API 登录信息 #412

Open
CDN18 opened this issue Jun 13, 2023 · 1 comment
Open

在配置文件中保存 HTTP API 登录信息 #412

CDN18 opened this issue Jun 13, 2023 · 1 comment
Labels
功能 新的特性(或Bug)

Comments

@CDN18
Copy link

CDN18 commented Jun 13, 2023

功能描述

目前要连接到外部MCL只能在启动服务器后手动输入命令,希望能在config.yml中加入HTTP API的登录信息配置,避免每次都要手动输入命令的麻烦。

http-api:
  url: http://localhost:8080
  message-fetch:
    interval: 10
    count: 10
  # 以下是对应的可能新增部分
  verifykey: key
  accounts:
    - 10000
    - 10001

使用方法

  1. 参照文档和功能描述填写config.yml
  2. 下次启动服务器时生效

额外说明

No response

@CDN18 CDN18 added the 功能 新的特性(或Bug) label Jun 13, 2023
@DreamVoid DreamVoid changed the title [Feature Request] 在配置文件中保存 HTTP API 登录信息 在配置文件中保存 HTTP API 登录信息 Jun 19, 2023
@DreamVoid
Copy link
Owner

实际上在设计这个功能的时候已经想过利用已有的“自动登录”功能实现 HTTP API 的自动连接,当时考虑到与现有的 mirai console loader 的兼容性没有直接采用这个方法,不过现在可以加进去了。
另外,没有考虑过在配置文件直接添加QQ号,至于添加密钥,如果未来把 HTTP API 的连接独立出 /mirai login 命令则可能考虑。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
功能 新的特性(或Bug)
Projects
None yet
Development

No branches or pull requests

2 participants