aboutsummaryrefslogtreecommitdiff
path: root/azalea/README.md
diff options
context:
space:
mode:
authorUbuntu <github@matdoes.dev>2023-02-10 18:06:18 +0000
committerUbuntu <github@matdoes.dev>2023-02-10 18:06:18 +0000
commitf5ae1b97171473c3c2db99d92062a18a8313541e (patch)
tree11f90f40a7894a4c569741b2cc77d0707449f64d /azalea/README.md
parent7e43e6d24a106fc9b1894a170db16b4f21ff8dad (diff)
downloadazalea-drasl-f5ae1b97171473c3c2db99d92062a18a8313541e.tar.xz
fix and improve examples in docs
Diffstat (limited to 'azalea/README.md')
-rwxr-xr-xazalea/README.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/azalea/README.md b/azalea/README.md
index a9ef7094..ed3c595e 100755
--- a/azalea/README.md
+++ b/azalea/README.md
@@ -33,7 +33,6 @@ opt-level = 1
opt-level = 3
```
-
# Examples
```rust,no_run
@@ -49,9 +48,9 @@ async fn main() {
// or Account::microsoft("example@example.com").await.unwrap();
loop {
- let e = azalea::ClientBuilder::new()
+ let e = ClientBuilder::new()
.set_handler(handle)
- .start(account, "localhost")
+ .start(account.clone(), "localhost")
.await;
eprintln!("{:?}", e);
}
@@ -72,6 +71,10 @@ async fn handle(bot: Client, event: Event, state: State) -> anyhow::Result<()> {
}
```
+# Swarms
+
+Azalea lets you create "swarms", which are a group of bots in the same world that can perform actions together. See [testbot](https://github.com/mat-1/azalea/blob/main/azalea/examples/testbot.rs) for an example.
+
# Plugins
Azalea uses [Bevy ECS](https://docs.rs/bevy_ecs) internally to store information about the world and clients. Bevy plugins are more powerful than async handler functions, but more difficult to use. See [pathfinder](azalea/src/pathfinder/mod.rs) as an example of how to make a plugin. You can then enable a plugin by adding `.add_plugin(ExamplePlugin)` in your client/swarm builder.