1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

fix SwarmEvent::Login and SwarmEvent::Init maybe

This commit is contained in:
mat 2023-12-16 15:19:27 -06:00
parent a069ffe982
commit 844ed11d02
2 changed files with 5 additions and 1 deletions

View file

@ -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)

View file

@ -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;