🐛 修复临时翻译无法使用的问题
This commit is contained in:
parent
7e1ccdd7a1
commit
07ab091176
@ -33,7 +33,7 @@ async def translate(context):
|
||||
result = translator.translate(clear_emojis(message), dest=lang)
|
||||
except:
|
||||
from translate import Translator as trans
|
||||
result = trans(to_lang=lang.replace('zh-cn', 'cn').translate(clear_emojis(message))
|
||||
result = trans(to_lang=lang.replace('zh-cn', 'zh')).translate(clear_emojis(message))
|
||||
except ValueError:
|
||||
await context.edit("出错了呜呜呜 ~ 找不到目标语言,请更正配置文件中的错误。")
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user