aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-04-20 03:40:59 +0000
committermat <git@matdoes.dev>2024-04-20 03:40:59 +0000
commit353eda21ac8280213edcec3823cc3bd77fe17c44 (patch)
treee57201568f99f3a3e9ebf7b8991b22b945bb65bc /azalea/examples
parentfa96af786b6f549edd8f04f4a19ced01faffe114 (diff)
downloadazalea-drasl-353eda21ac8280213edcec3823cc3bd77fe17c44.tar.xz
socks5 support (#113)
Diffstat (limited to 'azalea/examples')
-rw-r--r--azalea/examples/testbot/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/azalea/examples/testbot/main.rs b/azalea/examples/testbot/main.rs
index 86395b7e..6795e6cf 100644
--- a/azalea/examples/testbot/main.rs
+++ b/azalea/examples/testbot/main.rs
@@ -181,10 +181,12 @@ async fn swarm_handle(
_state: SwarmState,
) -> anyhow::Result<()> {
match &event {
- SwarmEvent::Disconnect(account) => {
+ SwarmEvent::Disconnect(account, join_opts) => {
println!("bot got kicked! {}", account.username);
tokio::time::sleep(Duration::from_secs(5)).await;
- swarm.add_and_retry_forever(account, State::default()).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" {