mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-17 03:20:54 +00:00
💡 update docstring
This commit is contained in:
@ -20,6 +20,20 @@ if TYPE_CHECKING:
|
||||
|
||||
|
||||
class Permission:
|
||||
"""
|
||||
:说明:
|
||||
|
||||
``Matcher`` 规则类,当事件传递时,在 ``Matcher`` 运行前进行检查。
|
||||
|
||||
:示例:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
Permission(async_function) | sync_function
|
||||
# 等价于
|
||||
from nonebot.utils import run_sync
|
||||
Permission(async_function, run_sync(sync_function))
|
||||
"""
|
||||
__slots__ = ("checkers",)
|
||||
|
||||
def __init__(
|
||||
|
Reference in New Issue
Block a user