mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-20 02:08:20 +08:00
commit
93ee9a3b58
@ -92,7 +92,8 @@ async def _check_matcher(priority: int, bot: Bot, event: Event,
|
|||||||
async def _check(Matcher: Type[Matcher], bot: Bot, event: Event,
|
async def _check(Matcher: Type[Matcher], bot: Bot, event: Event,
|
||||||
state: dict) -> Optional[Type[Matcher]]:
|
state: dict) -> Optional[Type[Matcher]]:
|
||||||
try:
|
try:
|
||||||
if await Matcher.check_perm(
|
if (Matcher.expire_time and datetime.now() <= Matcher.expire_time
|
||||||
|
) and await Matcher.check_perm(
|
||||||
bot, event) and await Matcher.check_rule(bot, event, state):
|
bot, event) and await Matcher.check_rule(bot, event, state):
|
||||||
return Matcher
|
return Matcher
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user