From 454e96a1328cce317cf28053ff0a1f70b08e737f Mon Sep 17 00:00:00 2001 From: RF-Tar-Railt Date: Tue, 1 Oct 2024 15:52:48 +0800 Subject: [PATCH] :memo: update README.md --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 45b6821..e83b926 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,9 @@ app.run() 编写插件: ```python -from arclet.entari import Session, MessageCreatedEvent, Plugin +from arclet.entari import Session, MessageCreatedEvent, metadata -Plugin.current().meta( +metadata( name="Hello, World!", author=["Arclet"], version="0.1.0", @@ -61,3 +61,16 @@ Plugin.current().meta( async def _(session: Session): await session.send("Hello, World!") ``` + +加载插件: + +```python +from arclet.entari import Entari, WS, load_plugin + +load_plugin("example_plugin") +load_plugin("::echo") +load_plugin("::auto_reload", {"watch_dirs": ["plugins"]}) + +app = Entari(WS(port=5140, path="satori")) +app.run() +``` \ No newline at end of file