mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 16:21:28 +00:00
⚗️ add type and permission updater hook
This commit is contained in:
@ -197,6 +197,36 @@ sidebarDepth: 0
|
||||
|
||||
|
||||
|
||||
### `_default_type_updater`
|
||||
|
||||
|
||||
* **类型**
|
||||
|
||||
`Optional[T_ArgsParser]`
|
||||
|
||||
|
||||
|
||||
* **说明**
|
||||
|
||||
事件响应器类型更新函数
|
||||
|
||||
|
||||
|
||||
### `_default_permission_updater`
|
||||
|
||||
|
||||
* **类型**
|
||||
|
||||
`Optional[T_ArgsParser]`
|
||||
|
||||
|
||||
|
||||
* **说明**
|
||||
|
||||
事件响应器权限更新函数
|
||||
|
||||
|
||||
|
||||
### `__init__()`
|
||||
|
||||
实例化 Matcher 以便运行
|
||||
@ -341,6 +371,38 @@ sidebarDepth: 0
|
||||
|
||||
|
||||
|
||||
### _classmethod_ `type_updater(func)`
|
||||
|
||||
|
||||
* **说明**
|
||||
|
||||
装饰一个函数来更改当前事件响应器的默认响应事件类型更新函数
|
||||
|
||||
|
||||
|
||||
* **参数**
|
||||
|
||||
|
||||
* `func: T_TypeUpdater`: 响应事件类型更新函数
|
||||
|
||||
|
||||
|
||||
### _classmethod_ `permission_updater(func)`
|
||||
|
||||
|
||||
* **说明**
|
||||
|
||||
装饰一个函数来更改当前事件响应器的默认会话权限更新函数
|
||||
|
||||
|
||||
|
||||
* **参数**
|
||||
|
||||
|
||||
* `func: T_PermissionUpdater`: 会话权限更新函数
|
||||
|
||||
|
||||
|
||||
### _classmethod_ `handle()`
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user