fix: 切换语音模式对各种语言源提示错误

This commit is contained in:
2ndelement 2023-04-23 01:34:51 +08:00
parent 8baef8b579
commit 68ef2d104f

View file

@ -510,10 +510,26 @@ export class chatgpt extends plugin {
} }
async switch2Audio (e) { async switch2Audio (e) {
switch (Config.ttsMode){
case 'vits-uma-genshin-honkai':
if(!Config.ttsSpace){ if(!Config.ttsSpace){
await this.reply('您没有配置VITS API请前往锅巴面板进行配置') await this.reply('您没有配置VITS API请前往锅巴面板进行配置')
return return
} }
break
case 'azure':
if(!Config.azureKey){
await this.reply('您没有配置Azure Key请前往锅巴面板进行配置')
return
}
break
case 'voicevox':
if(!Config.voicevoxSpace){
await this.reply('您没有配置VoiceVox API请前往锅巴面板进行配置')
return
}
break
}
let userSetting = await redis.get(`CHATGPT:USER:${e.sender.user_id}`) let userSetting = await redis.get(`CHATGPT:USER:${e.sender.user_id}`)
if (!userSetting) { if (!userSetting) {
userSetting = getDefaultReplySetting() userSetting = getDefaultReplySetting()