aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-12-16 15:19:27 -0600
committermat <git@matdoes.dev>2023-12-16 15:19:27 -0600
commit844ed11d02163f5a179c670d59d464146c4d9a9f (patch)
tree7cf1f8db53edcd8d9613b1f765c438dda844b26b
parenta069ffe9827dc554cbb749f5e7d88c2d36906c3d (diff)
downloadazalea-drasl-844ed11d02163f5a179c670d59d464146c4d9a9f.tar.xz
fix SwarmEvent::Login and SwarmEvent::Init maybe
-rwxr-xr-xazalea/examples/echo.rs2
-rw-r--r--azalea/src/swarm/mod.rs4
2 files changed, 5 insertions, 1 deletions
diff --git a/azalea/examples/echo.rs b/azalea/examples/echo.rs
index 01390982..38c5d801 100755
--- a/azalea/examples/echo.rs
+++ b/azalea/examples/echo.rs
@@ -5,7 +5,7 @@ use azalea::prelude::*;
#[tokio::main]
async fn main() {
let account = Account::offline("bot");
- // or let account = Account::microsoft("email").await.unwrap();
+ let account = Account::microsoft("email").await.unwrap();
ClientBuilder::new()
.set_handler(handle)
diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs
index ca947579..6d3885ef 100644
--- a/azalea/src/swarm/mod.rs
+++ b/azalea/src/swarm/mod.rs
@@ -317,6 +317,8 @@ where
let (bots_tx, mut bots_rx) = mpsc::unbounded_channel();
let (swarm_tx, mut swarm_rx) = mpsc::unbounded_channel();
+ swarm_tx.send(SwarmEvent::Init).unwrap();
+
let (run_schedule_sender, run_schedule_receiver) = mpsc::unbounded_channel();
let main_schedule_label = self.app.main_schedule_label;
@@ -377,6 +379,8 @@ where
)
.await;
}
+
+ swarm_tx.send(SwarmEvent::Login).unwrap();
});
let swarm_state = self.swarm_state;