aboutsummaryrefslogtreecommitdiff
path: root/bot/src
diff options
context:
space:
mode:
Diffstat (limited to 'bot/src')
-rw-r--r--bot/src/main.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/bot/src/main.rs b/bot/src/main.rs
index 84867d78..3daaa160 100644
--- a/bot/src/main.rs
+++ b/bot/src/main.rs
@@ -1,3 +1,5 @@
+use azalea_client::{Account, Event};
+
#[tokio::main]
async fn main() {
println!("Hello, world!");
@@ -9,11 +11,15 @@ async fn main() {
// .unwrap();
// println!("{}", response.description.to_ansi(None));
- let account = azalea_client::Account::offline("bot");
- let client = account.join(&address.try_into().unwrap()).await.unwrap();
+ let account = Account::offline("bot");
+ let mut client = account.join(&address.try_into().unwrap()).await.unwrap();
println!("connected");
- // loop {
- // match client.next().await {}
- // }
+ while let Some(e) = client.next().await {
+ match e {
+ Event::Login => {}
+ }
+ }
+
+ println!("done");
}