Skip to content

Commit 454e96a

Browse files
committed
📝 update README.md
1 parent 282b26f commit 454e96a

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ app.run()
4747
编写插件:
4848

4949
```python
50-
from arclet.entari import Session, MessageCreatedEvent, Plugin
50+
from arclet.entari import Session, MessageCreatedEvent, metadata
5151

52-
Plugin.current().meta(
52+
metadata(
5353
name="Hello, World!",
5454
author=["Arclet"],
5555
version="0.1.0",
@@ -61,3 +61,16 @@ Plugin.current().meta(
6161
async def _(session: Session):
6262
await session.send("Hello, World!")
6363
```
64+
65+
加载插件:
66+
67+
```python
68+
from arclet.entari import Entari, WS, load_plugin
69+
70+
load_plugin("example_plugin")
71+
load_plugin("::echo")
72+
load_plugin("::auto_reload", {"watch_dirs": ["plugins"]})
73+
74+
app = Entari(WS(port=5140, path="satori"))
75+
app.run()
76+
```

0 commit comments

Comments
 (0)