From 45f9d276013cbfa96fbe75c20aa8709281453fe4 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 1 Dec 2023 22:49:44 -0600 Subject: disconnect fixes --- azalea/examples/testbot.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'azalea/examples') diff --git a/azalea/examples/testbot.rs b/azalea/examples/testbot.rs index b2f09dfe..74ecfd8a 100644 --- a/azalea/examples/testbot.rs +++ b/azalea/examples/testbot.rs @@ -354,6 +354,13 @@ async fn handle(mut bot: Client, event: Event, _state: State) -> anyhow::Result< println!("login packet"); } } + Event::Disconnect(reason) => { + if let Some(reason) = reason { + println!("bot got kicked for reason: {}", reason.to_ansi()); + } else { + println!("bot got kicked"); + } + } _ => {} } -- cgit v1.2.3