feat: 将tips的值统一为str类型

This commit is contained in:
Rock Chin 2023-04-07 13:23:58 +08:00
parent 83d02aaaac
commit 07abad6a14
3 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ class ResetCommand(AbstractCommandNode):
if len(params) == 0:
pkg.openai.session.get_session(session_name).reset(explicit=True)
reply = tips_custom.command_reset_message
reply = [tips_custom.command_reset_message]
else:
try:
import pkg.openai.dprompt as dprompt

View File

@ -269,7 +269,7 @@ class QQBotManager:
if failed == self.retry:
pkg.openai.session.get_session('person_{}'.format(event.sender.id)).release_response_lock()
self.notify_admin("{} 请求超时".format("person_{}".format(event.sender.id)))
reply = tips_custom.reply_message
reply = [tips_custom.reply_message]
if reply:
return self.send(event, reply, check_quote=False)
@ -309,7 +309,7 @@ class QQBotManager:
if failed == self.retry:
pkg.openai.session.get_session('group_{}'.format(event.group.id)).release_response_lock()
self.notify_admin("{} 请求超时".format("group_{}".format(event.group.id)))
replys = tips_custom.replys_message
replys = [tips_custom.replys_message]
return replys

View File

@ -32,9 +32,9 @@ help_message = """【可自定义】
# QChatGPT/pkg/qqbot/manager.py
# 私聊消息超时提示,line:271
reply_message = ["私聊请求超时"]
reply_message = "私聊请求超时"
# 群聊消息超时提示,line:310
replys_message = ["群聊请求超时"]
replys_message = "群聊请求超时"
# 指令权限不足/无效提示
# QChatGPT/pkg/qqbot/command.pyline:57
@ -46,5 +46,5 @@ command_err_message = "指令执行出错:"
# 会话重置提示
# pkg/qqbot/cmds/session/reset.pyline:25,31
command_reset_message = ["[bot]会话已重置"]
command_reset_message = "[bot]会话已重置"
command_reset_name_message = "[bot]会话已重置,使用场景预设:"