调整内容
This commit is contained in:
@@ -162,6 +162,16 @@ class LuckyPotPlugin(MessagePluginInterface):
|
|||||||
self.status = PluginStatus.STOPPED
|
self.status = PluginStatus.STOPPED
|
||||||
return True
|
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="拼手气大奖池")
|
@plugin_stats_decorator(plugin_name="拼手气大奖池")
|
||||||
async def process_message(self, message: Dict[str, Any]) -> Tuple[bool, Optional[str]]:
|
async def process_message(self, message: Dict[str, Any]) -> Tuple[bool, Optional[str]]:
|
||||||
"""处理消息"""
|
"""处理消息"""
|
||||||
|
|||||||
Reference in New Issue
Block a user