🐛 统一被动技能判断

This commit is contained in:
HibiKier
2024-08-03 00:34:19 +08:00
parent 7ab800be97
commit 131cd5ea9a
6 changed files with 14 additions and 23 deletions
+1 -7
View File
@@ -45,13 +45,7 @@ __plugin_meta__ = PluginMetadata(
async def _rule(session: EventSession) -> bool:
task = await TaskInfo.get_or_none(module="bilibili_parse")
if not task or not task.status:
logger.debug("b站转发解析被动全局关闭,已跳过...")
return False
if gid := session.id3 or session.id2:
return not await GroupConsole.is_block_task(gid, "bilibili_parse")
return False
return not TaskInfo.is_block("bilibili_parse", session.id3 or session.id2)
_matcher = on_message(priority=1, block=False, rule=_rule)