perf👌: 广播与全局插件/被动管理

This commit is contained in:
HibiKier
2024-02-29 03:07:31 +08:00
parent 88bda9ce2c
commit a2d6c7f951
8 changed files with 433 additions and 138 deletions
+6
View File
@@ -108,6 +108,12 @@ class GroupConsole(Model):
返回:
bool: 是否禁用被动
"""
if not channel_id:
return await cls.exists(
group_id=group_id,
channel_id__isnull=True,
block_task__contains=f"{task},",
)
return await cls.exists(
group_id=group_id, channel_id=channel_id, block_task__contains=f"{task},"
)