首次启动或修改账号时可配置签名API
Signed-off-by: 千奈千祁 <12279051+qiannqq@user.noreply.gitee.com>
This commit is contained in:
parent
c3efed3c53
commit
4e4c79ee70
|
@ -61,6 +61,11 @@ export default async function createQQ () {
|
|||
name: 'masterQQ'
|
||||
})
|
||||
}
|
||||
propmtList.push({
|
||||
type: 'input',
|
||||
message: '请输入签名API地址(可留空):',
|
||||
name: 'signAPI'
|
||||
})
|
||||
const ret = await inquirer.prompt(propmtList)
|
||||
|
||||
let file = './config/config/'
|
||||
|
@ -82,6 +87,10 @@ export default async function createQQ () {
|
|||
fs.writeFileSync(`${file}other.yaml`, other, 'utf8')
|
||||
}
|
||||
|
||||
if (ret.signAPI) {
|
||||
bot = bot.replace(/sign_api_addr:\s*/, `sign_api_addr: ${ret.signAPI}`);
|
||||
}
|
||||
|
||||
fs.writeFileSync(`${file}bot.yaml`, bot, 'utf8')
|
||||
|
||||
console.log(`\nQQ配置完成,正在登录\n后续修改账号可以运行命令: ${chalk.green('node app login')}\n`)
|
||||
|
|
Loading…
Reference in New Issue