decouple message processing process

This commit is contained in:
lanvent
2023-03-12 00:58:49 +08:00
parent 38c8ceba12
commit d6037422ac
3 changed files with 164 additions and 133 deletions

View File

@@ -15,6 +15,11 @@ class Bridge(object):
except ModuleNotFoundError as e:
print(e)
# 以下所有函数需要得到一个reply字典格式如下
# reply["type"] = "ERROR" / "TEXT" / "VOICE" / ...
# reply["content"] = reply的内容
def fetch_reply_content(self, query, context):
return self.bots["chat"].reply(query, context)