mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-10 22:30:02 +08:00
✨ 提供qq协议端判断方法,广播添加to_me规则以及延迟 (#1858)
* ✨ 提供qq协议端判断方法 * 🩹 API重试添加额外错误捕获 * 🩹 广播添加延迟,添加to_me规则
This commit is contained in:
@@ -29,6 +29,7 @@ _flmt = FreqLimiter(300)
|
||||
async def _(
|
||||
matcher: Matcher, bot: Bot, event: Event, state: T_State, session: EventSession
|
||||
):
|
||||
extra = {}
|
||||
if plugin := matcher.plugin:
|
||||
if metadata := plugin.metadata:
|
||||
extra = metadata.extra
|
||||
@@ -66,7 +67,12 @@ async def _(
|
||||
time_str = f"{hours} 小时 {minute}分钟"
|
||||
else:
|
||||
time_str = f"{minute} 分钟"
|
||||
if time != -1 and ban_result and _flmt.check(user_id):
|
||||
if (
|
||||
not extra.get("ignore_prompt")
|
||||
and time != -1
|
||||
and ban_result
|
||||
and _flmt.check(user_id)
|
||||
):
|
||||
_flmt.start_cd(user_id)
|
||||
await MessageUtils.build_message(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user