feat: 新增自定义指令/keyword

This commit is contained in:
Soulter
2023-04-08 20:21:49 +08:00
parent 45bb30692d
commit 9bca158174
5 changed files with 134 additions and 110 deletions

View File

@@ -12,16 +12,18 @@ class CommandRevEdgeGPT(Command):
return True, self.help()
elif self.command_start_with(message, "update"):
return True, self.update(message)
elif self.command_start_with(message, "keyword"):
return True, self.keyword(message)
return False, None
def reset(self, loop):
res = asyncio.run_coroutine_threadsafe(self.provider.forget(), loop).result()
print(res)
if res:
return res, "重置成功"
return res, "重置成功", "reset"
else:
return res, "重置失败"
return res, "重置失败", "reset"
def help(self):
return True, "[Github项目名: QQChannelChatGPT有问题请前往提交issue欢迎Star此项目~]\n\nRevBing指令面板:\nreset: 重置\nhelp: 帮助"
return True, "[Github项目名: QQChannelChatGPT有问题请前往提交issue欢迎Star此项目~]\n\nRevBing指令面板:\nreset: 重置\nhelp: 帮助", "help"