fix: 将除去昵称和@后,/开头的消息都视为指令
This commit is contained in:
@@ -56,6 +56,7 @@ class Command:
|
||||
"update latest": "更新到最新版本",
|
||||
"update r": "重启程序",
|
||||
"reset": "重置会话",
|
||||
"nick": "设置机器人昵称",
|
||||
"/bing": "切换到bing模型",
|
||||
"/gpt": "切换到OpenAI ChatGPT API",
|
||||
"/revgpt": "切换到网页版ChatGPT",
|
||||
|
||||
@@ -37,6 +37,9 @@ class CommandOpenAIOfficial(Command):
|
||||
elif self.command_start_with(message, "key"):
|
||||
return True, self.key(message, user_name)
|
||||
|
||||
if self.command_start_with(message, "/"):
|
||||
return True, (False, "未知指令", "unknown_command")
|
||||
|
||||
return False, None
|
||||
|
||||
def help(self):
|
||||
|
||||
@@ -17,6 +17,9 @@ class CommandRevChatGPT(Command):
|
||||
return True, self.update(message, role)
|
||||
elif self.command_start_with(message, "keyword"):
|
||||
return True, self.keyword(message, role)
|
||||
|
||||
if self.command_start_with(message, "/"):
|
||||
return True, (False, "未知指令", "unknown_command")
|
||||
return False, None
|
||||
|
||||
def reset(self):
|
||||
|
||||
@@ -17,6 +17,9 @@ class CommandRevEdgeGPT(Command):
|
||||
return True, self.update(message, role)
|
||||
elif self.command_start_with(message, "keyword"):
|
||||
return True, self.keyword(message, role)
|
||||
|
||||
if self.command_start_with(message, "/"):
|
||||
return True, (False, "未知指令", "unknown_command")
|
||||
return False, None
|
||||
|
||||
def reset(self, loop):
|
||||
|
||||
Reference in New Issue
Block a user