diff --git a/lib/config/qq.js b/lib/config/qq.js index 2a30c70..86b8761 100644 --- a/lib/config/qq.js +++ b/lib/config/qq.js @@ -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`)