✨ 提供qq协议端判断方法,广播添加to_me规则以及延迟 (#1858)

* ✨ 提供qq协议端判断方法

* 🩹 API重试添加额外错误捕获

* 🩹 广播添加延迟,添加to_me规则
This commit is contained in:
HibiKier
2025-02-24 09:33:06 +08:00
committed by GitHub
parent a6ddb726d3
commit f1d32bff89
5 changed files with 82 additions and 56 deletions
+7 -1
View File
@@ -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(
[