perf: 更好的插件处理逻辑和更开放的插件功能

This commit is contained in:
Soulter
2023-05-13 10:54:57 +08:00
parent 33793a2053
commit 2bf9c82617
9 changed files with 130 additions and 69 deletions
+9 -2
View File
@@ -4,9 +4,16 @@ import asyncio
class CommandRevEdgeGPT(Command):
def __init__(self, provider: ProviderRevEdgeGPT):
self.provider = provider
self.cached_plugins = {}
def check_command(self, message: str, loop, role, platform: str):
hit, res = super().check_command(message, role, platform)
def check_command(self,
message: str,
loop,
role: str,
platform: str,
message_obj):
hit, res = super().check_command(message, role, platform, message_obj=message_obj)
if hit:
return True, res
if self.command_start_with(message, "reset"):