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();