From 1a53d145f616b06864852a566788e9717f4ebbdb Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 13 Aug 2025 17:52:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/lucky_pot/main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/lucky_pot/main.py b/plugins/lucky_pot/main.py index c79aef4..3f29d83 100644 --- a/plugins/lucky_pot/main.py +++ b/plugins/lucky_pot/main.py @@ -162,6 +162,16 @@ class LuckyPotPlugin(MessagePluginInterface): self.status = PluginStatus.STOPPED return True + def can_process(self, message: Dict[str, Any]) -> bool: + """检查是否可以处理该消息""" + if not self.enable: + return False + + content = str(message.get("content", "")).strip() + command = content.split(" ")[0] + + return command in self._commands + @plugin_stats_decorator(plugin_name="拼手气大奖池") async def process_message(self, message: Dict[str, Any]) -> Tuple[bool, Optional[str]]: """处理消息"""