From 9433ad5d703a253573c20308a2bd6383a82e9133 Mon Sep 17 00:00:00 2001 From: y5c4l3 Date: Sun, 22 Oct 2023 22:14:52 +0000 Subject: [PATCH] fix: make examples working --- examples/echobot.rs | 4 +++- examples/tbot.rs | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/echobot.rs b/examples/echobot.rs index cab4759..444ad21 100644 --- a/examples/echobot.rs +++ b/examples/echobot.rs @@ -10,7 +10,9 @@ async fn main() -> Result<()> { .password(std::env::var("BANCHO_PASSWORD").unwrap()) .build(); - let client = Client::new(options).await?; + let mut client = Client::new(options); + client.run().await?; + client.auth().await?; let operator = client.operator(); let mut subscriber = operator.subscribe(); loop { diff --git a/examples/tbot.rs b/examples/tbot.rs index d7ab6e8..bb643e8 100644 --- a/examples/tbot.rs +++ b/examples/tbot.rs @@ -12,9 +12,10 @@ async fn main() -> Result<()> { .password(std::env::var("BANCHO_PASSWORD").unwrap()) .build(); - let client = Client::new(options).await?; - let operator = client.operator(); + let mut client = Client::new(options); + client.run().await?; client.auth().await?; + let operator = client.operator(); let title = "TBOT LOBBY".to_string(); let password = "tbot".to_string();