💡 update docstring

This commit is contained in:
yanyongyu
2021-05-30 11:07:27 +08:00
parent 45e1126f37
commit 916bb5b0e6
4 changed files with 90 additions and 1 deletions

View File

@ -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__(