mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-16 11:00:54 +00:00
✨ Feature: 支持主动销毁事件响应器 (#1444)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -247,6 +247,11 @@ class Matcher(metaclass=MatcherMeta):
|
||||
|
||||
return NewMatcher
|
||||
|
||||
@classmethod
|
||||
def destroy(cls) -> None:
|
||||
"""销毁当前的事件响应器"""
|
||||
matchers[cls.priority].remove(cls)
|
||||
|
||||
@classmethod
|
||||
async def check_perm(
|
||||
cls,
|
||||
|
Reference in New Issue
Block a user