mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-29 00:32:06 +08:00
🐛 命令检测过滤b站解析
This commit is contained in:
@@ -61,6 +61,9 @@ _blmt = BanCheckLimiter(
|
||||
malicious_ban_count,
|
||||
)
|
||||
|
||||
# TODO: 恶意出发命令检测过滤
|
||||
_ignore = ["parse_bilibili"]
|
||||
|
||||
|
||||
# 恶意触发命令检测
|
||||
@run_preprocessor
|
||||
@@ -70,7 +73,7 @@ async def _(matcher: Matcher, bot: Bot, session: EventSession, state: T_State):
|
||||
module = plugin.module_name
|
||||
if metadata := plugin.metadata:
|
||||
extra = metadata.extra
|
||||
if extra.get("plugin_type") == PluginType.HIDDEN:
|
||||
if extra.get("plugin_type") == PluginType.HIDDEN or module not in _ignore:
|
||||
return
|
||||
user_id = session.id1
|
||||
group_id = session.id3 or session.id2
|
||||
|
||||
Reference in New Issue
Block a user