mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-30 09:10:01 +08:00
update code
This commit is contained in:
+1
-9
@@ -116,15 +116,10 @@ async def _(matcher: Matcher, bot: Bot, event: GroupMessageEvent, state: T_State
|
||||
return
|
||||
if matcher.type == "message" and matcher.priority not in [1, 9]:
|
||||
if state["_prefix"]["raw_command"]:
|
||||
# print(state["_prefix"]["raw_command"])
|
||||
if _blmt.check(f'{event.user_id}{state["_prefix"]["raw_command"]}'):
|
||||
if await BanUser.ban(event.user_id, 9, MALICIOUS_BAN_TIME * 60):
|
||||
logger.info(f"USER {event.user_id} 触发了恶意触发检测")
|
||||
# await update_img.finish('检测到恶意触发命令,您将被封禁 30 分钟', at_sender=True)
|
||||
if event.message_type == "group":
|
||||
if not static_flmt.check(event.user_id):
|
||||
return
|
||||
static_flmt.start_cd(event.user_id)
|
||||
if isinstance(event, GroupMessageEvent):
|
||||
try:
|
||||
await bot.send_group_msg(
|
||||
group_id=event.group_id,
|
||||
@@ -133,9 +128,6 @@ async def _(matcher: Matcher, bot: Bot, event: GroupMessageEvent, state: T_State
|
||||
except ActionFailed:
|
||||
pass
|
||||
else:
|
||||
if not static_flmt.check(event.user_id):
|
||||
return
|
||||
static_flmt.start_cd(event.user_id)
|
||||
try:
|
||||
await bot.send_private_msg(
|
||||
user_id=event.user_id,
|
||||
|
||||
Reference in New Issue
Block a user