update lib/config/qq.js.

Signed-off-by: touchscale <11134128+touchscale@user.noreply.gitee.com>
This commit is contained in:
touchscale 2023-04-24 23:57:20 +00:00 committed by Gitee
parent 6fa6a72cff
commit 360b476e87
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 5 additions and 4 deletions

View File

@ -32,16 +32,17 @@ export default async function createQQ () {
type: 'list',
message: '请选择登录端口:',
name: 'platform',
default: '5',
choices: ['iPad', '安卓手机', '安卓手表', 'MacOS', 'aPad'],
default: '6',
choices: ['old_Android', 'iPad', '安卓手机', '安卓手表', 'MacOS', 'aPad'],
filter: (val) => {
switch (val) {
case 'old_Android':return 6
case 'iPad':return 5
case 'MacOS':return 4
case '安卓手机':return 1
case '安卓手表':return 3
case 'aPad':return 2
default:return 5
default:return 6
}
}
}
@ -69,7 +70,7 @@ export default async function createQQ () {
qq = qq.replace(/qq:/g, 'qq: ' + ret.QQ)
qq = qq.replace(/pwd:/g, `pwd: '${ret.pwd}'`)
qq = qq.replace(/platform: [1-5]/g, 'platform: ' + Number(ret.platform))
qq = qq.replace(/platform: [1-6]/g, 'platform: ' + Number(ret.platform))
fs.writeFileSync(`${file}qq.yaml`, qq, 'utf8')
let bot = fs.readFileSync(`${fileDef}bot.yaml`, 'utf8')