Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

feat: set key and is-below-110 to go-cqhttp #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ class Launcher extends DataService<Dict<Data>> {
const config = {
message: JSON.stringify(this.config.message),
signServer: this.config.signServer,
key: this.config.key,
isBelow110: this.config.isBelow110,
...bot.config,
...bot.config.gocqhttp,
}
Expand Down Expand Up @@ -408,6 +410,8 @@ namespace Launcher {
host: string
root?: string
signServer?: string
key?: string
isBelow110?: boolean
logLevel?: number
template?: string
message?: Dict
Expand All @@ -420,6 +424,8 @@ namespace Launcher {
allowCreate: true,
}).description('存放账户文件的目录。').default('data/go-cqhttp/accounts'),
signServer: Schema.string().description('签名服务器地址。'),
key: Schema.string().description('签名服务器密钥。').default('114514'),
isBelow110: Schema.boolean().default(false).description('签名服务器是否低于 1.1.0 版本。'),
logLevel: Schema.number().description('输出日志等级。').default(2),
template: Schema.string().description('使用的配置文件模板。').hidden(),
message: Schema.object({
Expand Down
8 changes: 8 additions & 0 deletions template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ account:
# 服务器可使用 docker 在本地搭建或者使用他人开放的服务
sign-server: ${{ signServer }}

# 如果签名服务器的版本在1.1.0及以下, 请将下面的参数改成true
is-below-110: ${{ isBelow110 }}

# 签名服务器所需要的apikey, 如果签名服务器的版本在1.1.0及以下则此项无效
# 本地部署的默认为114514
key: >-
${{ key }}

heartbeat:
# 心跳频率, 单位秒
# -1 为关闭心跳
Expand Down