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]]: """处理消息"""