mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 增加指令切换翻译源
This commit is contained in:
parent
35ad437df2
commit
4886042e3c
1 changed files with 21 additions and 0 deletions
|
|
@ -59,6 +59,10 @@ export class Entertainment extends plugin {
|
|||
reg: '^#((寄批踢|gpt|GPT)?翻[sS]*|chatgpt翻译帮助)',
|
||||
fnc: 'translate'
|
||||
},
|
||||
{
|
||||
reg: '^#(chatgpt)?(设置|修改)翻译来源(openai|gemini|星火|通义千问|xh|qwen)$',
|
||||
fnc: 'translateSource'
|
||||
},
|
||||
{
|
||||
reg: '^#ocr',
|
||||
fnc: 'ocr'
|
||||
|
|
@ -187,6 +191,23 @@ ${translateLangLabels}
|
|||
return true
|
||||
}
|
||||
|
||||
translateSource (e) {
|
||||
let command = e.msg
|
||||
if (command.includes('openai')) {
|
||||
Config.translateSource = 'openai'
|
||||
} else if (command.msg.includes('gemini')) {
|
||||
Config.translateSource = 'gemini'
|
||||
} else if (command.msg.includes('星火')) {
|
||||
Config.translateSource = 'xh'
|
||||
} else if (command.msg.includes('通义千问')) {
|
||||
Config.translateSource = 'qwen'
|
||||
} else if (command.msg.includes('xh')) {
|
||||
Config.translateSource = 'xh'
|
||||
} else if (command.msg.includes('qwen')) {
|
||||
Config.translateSource = 'qwen'
|
||||
}
|
||||
}
|
||||
|
||||
async wordcloud (e) {
|
||||
if (e.isGroup) {
|
||||
let groupId = e.group_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue