Skip to content

Commit

Permalink
Merge pull request #724 from Ikaros-521/owner
Browse files Browse the repository at this point in the history
修复sd没选翻译也走谷歌翻译的bug
  • Loading branch information
Ikaros-521 authored Mar 24, 2024
2 parents 7b83021 + 096017f commit d2cd6cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions utils/my_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,10 +921,11 @@ def sd_handle(self, data):
# 删除文本中的命令前缀
content = content[len(My_handle.config.get("sd", "trigger")):]

# 判断翻译类型 进行翻译工作
tmp = My_handle.my_translate.trans(content, My_handle.config.get("sd", "translate_type"))
if tmp:
content = tmp
if My_handle.config.get("sd", "translate_type") != "none":
# 判断翻译类型 进行翻译工作
tmp = My_handle.my_translate.trans(content, My_handle.config.get("sd", "translate_type"))
if tmp:
content = tmp

"""
根据聊天类型执行不同逻辑
Expand Down

0 comments on commit d2cd6cb

Please sign in to comment.