🐛 detect runtime plugin (#1857)

This commit is contained in:
Ju4tCode
2023-03-29 12:22:50 +08:00
committed by GitHub
parent 17c86f7da2
commit 2a2f7b6dce
6 changed files with 163 additions and 85 deletions

View File

@ -90,3 +90,6 @@ async def overload(event: FakeEvent):
@test_overload.handle()
async def finish():
await test_overload.finish()
test_destroy = on_message()

View File

@ -1,6 +1,8 @@
from typing import Type
from datetime import datetime, timezone
from nonebot.adapters import Event
from nonebot.matcher import Matcher
from nonebot import (
CommandGroup,
MatcherGroup,
@ -50,6 +52,20 @@ matcher_on = on(
)
def matcher_on_factory() -> Type[Matcher]:
return on(
"test",
rule=rule,
permission=permission,
handlers=[handler],
temp=True,
expire_time=expire_time,
priority=priority,
block=True,
state=state,
)
matcher_on_metaevent = on_metaevent(
rule=rule,
handlers=[handler],