From 784ec5e8678771d8b31eca4cc003d7207f9b2f30 Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 16 Apr 2026 01:51:34 -0400 Subject: [PATCH] fix: exit the program to trigger a restart when the gateway closes --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index bfdb746..0c405ef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -340,6 +340,10 @@ async fn handle_events(command_router: Arc, state: State, mut sha Ok(event) => { handle_event(command_router.clone(), state.clone(), event).await; } + Err(twilight_gateway::error::Event::GatewayClose(frame_option)) => { + tracing::warn!(?frame_option); + return; + } Err(error) => { tracing::error!(?error); }