diff options
Diffstat (limited to 'azalea/examples')
| -rw-r--r-- | azalea/examples/testbot/main.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/azalea/examples/testbot/main.rs b/azalea/examples/testbot/main.rs index c25904cf..6733d797 100644 --- a/azalea/examples/testbot/main.rs +++ b/azalea/examples/testbot/main.rs @@ -192,14 +192,10 @@ async fn handle(bot: Client, event: azalea::Event, state: State) -> anyhow::Resu Ok(()) } -async fn swarm_handle(swarm: Swarm, event: SwarmEvent, _state: SwarmState) -> anyhow::Result<()> { +async fn swarm_handle(_swarm: Swarm, event: SwarmEvent, _state: SwarmState) -> anyhow::Result<()> { match &event { - SwarmEvent::Disconnect(account, join_opts) => { + SwarmEvent::Disconnect(account, _join_opts) => { println!("bot got kicked! {}", account.username); - tokio::time::sleep(Duration::from_secs(5)).await; - swarm - .add_and_retry_forever_with_opts(account, State::default(), join_opts) - .await; } SwarmEvent::Chat(chat) => { if chat.message().to_string() == "The particle was not visible for anybody" { |
