Skip to content

Commit

Permalink
📝 update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Oct 1, 2024
1 parent 282b26f commit 454e96a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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()
```

0 comments on commit 454e96a

Please sign in to comment.