perf: 支持使用/开头的指令

This commit is contained in:
Soulter
2023-04-03 21:44:46 +08:00
parent 5b97fd2e6f
commit 291d3ebae8
4 changed files with 26 additions and 22 deletions
+2 -7
View File
@@ -6,14 +6,9 @@ class CommandRevChatGPT(Command):
self.provider = provider
def check_command(self, message: str):
# hit, res = super().check_command(message)
# if hit:
# return res
# if message.startswith("reset") or message.startswith("重置"):
# return True, self.reset()
if message.startswith("help") or message.startswith("帮助"):
if self.command_start_with(message, "help", "帮助"):
return True, self.help()
elif message.startswith("update"):
elif self.command_start_with(message, "update"):
return True, self.update(message)
return False, None