使被 ban 提示受配置IS_SEND_TIP_MESSAGE管控

This commit is contained in:
molanp 2025-06-27 19:33:26 +08:00 committed by GitHub
parent 8b9ae7255b
commit c28545dc6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,11 +74,12 @@ async def _(
and _flmt.check(user_id) and _flmt.check(user_id)
): ):
_flmt.start_cd(user_id) _flmt.start_cd(user_id)
await MessageUtils.build_message( if Config.get_config("hook", "IS_SEND_TIP_MESSAGE"):
[ await MessageUtils.build_message(
At(flag="user", target=user_id), [
f"{ban_result}\n在..在 {time_str} 后才会理你喔", At(flag="user", target=user_id),
] f"{ban_result}\n在..在 {time_str} 后才会理你喔",
).send() ]
).send()
logger.debug("用户处于黑名单中...", "ban_hook") logger.debug("用户处于黑名单中...", "ban_hook")
raise IgnoredException("用户处于黑名单中...") raise IgnoredException("用户处于黑名单中...")