feat: process_message函数现在返回消息链

This commit is contained in:
Rock Chin
2022-12-26 23:53:56 +08:00
parent 8bd91025ad
commit 5c0cd841f9
2 changed files with 51 additions and 46 deletions
+4 -4
View File
@@ -136,9 +136,9 @@ 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 = "[bot]err:请求超时"
reply = ["[bot]err:请求超时"]
if reply != '':
if reply:
return self.send(event, reply)
# 群消息处理
@@ -164,7 +164,7 @@ class QQBotManager:
if failed == self.retry:
self.notify_admin("{} 请求超时".format("group_{}".format(event.sender.id)))
replys = "[bot]err:请求超时"
replys = ["[bot]err:请求超时"]
return replys
@@ -179,7 +179,7 @@ class QQBotManager:
# 直接调用
reply = process()
if reply != '':
if reply:
return self.send(event, reply)
# 通知系统管理员