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
+3 -3
View File
@@ -6,11 +6,11 @@ class CommandRevEdgeGPT(Command):
self.provider = provider
def check_command(self, message: str, loop):
if message.startswith("reset") or message.startswith("重置"):
if self.command_start_with(message, "reset"):
return True, self.reset(loop)
elif message.startswith("help") or message.startswith("帮助"):
elif 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