From e308d4cfac6f64513b4d8b92a34a8ab176e607fd Mon Sep 17 00:00:00 2001 From: Lptr-byte <54620759+Lptr-byte@users.noreply.github.com> Date: Sun, 7 May 2023 00:56:22 +0800 Subject: [PATCH] =?UTF-8?q?Docs:=20=E4=BF=AE=E5=A4=8D=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=87=BD=E6=95=B0=E6=96=87=E6=A1=A3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=8C=83=E4=BE=8B=E4=B8=AD=E7=BC=BA=E5=A4=B1=E7=9A=84?= =?UTF-8?q?=20import=20(#1982)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/versioned_docs/version-2.0.0rc4/tutorial/handler.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/versioned_docs/version-2.0.0rc4/tutorial/handler.mdx b/website/versioned_docs/version-2.0.0rc4/tutorial/handler.mdx index ba63b96c..816472b9 100644 --- a/website/versioned_docs/version-2.0.0rc4/tutorial/handler.mdx +++ b/website/versioned_docs/version-2.0.0rc4/tutorial/handler.mdx @@ -26,7 +26,8 @@ import Messenger from "@site/src/components/Messenger"; 顾名思义,“事件处理函数装饰器”是一个[装饰器(decorator)](https://docs.python.org/zh-cn/3/glossary.html#term-decorator),那么它的使用方法也同[函数定义](https://docs.python.org/zh-cn/3/reference/compound_stmts.html#function-definitions)中所展示的包装用法相同。例如: -```python {5-7} title=weather/__init__.py +```python {6-8} title=weather/__init__.py +from nonebot.rule import to_me from nonebot.plugin import on_command weather = on_command("天气", rule=to_me(), aliases={"weather", "查天气"}, priority=10, block=True)