diff options
| author | mat <git@matdoes.dev> | 2023-12-01 22:49:44 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-12-01 22:49:44 -0600 |
| commit | 45f9d276013cbfa96fbe75c20aa8709281453fe4 (patch) | |
| tree | dc2d692ca40bb72d500cdae0b712eb2609a86afb /azalea | |
| parent | fbee81e609e0cbc1bb8aff8ae649bca4e44ae465 (diff) | |
| download | azalea-drasl-45f9d276013cbfa96fbe75c20aa8709281453fe4.tar.xz | |
disconnect fixes
Diffstat (limited to 'azalea')
| -rw-r--r-- | azalea/examples/testbot.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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"); + } + } _ => {} } |
