From e4e274a5433ea9178d21e1603ebb18e9b0a9d1c9 Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 16 Apr 2026 02:03:52 -0400 Subject: [PATCH] fix: have to use `match` to detect `ReceiveMessageErrorType` --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0a155bd..440ac58 100644 --- a/src/main.rs +++ b/src/main.rs @@ -344,7 +344,8 @@ async fn handle_events(command_router: Arc, state: State, mut sha Ok(event) => { handle_event(command_router.clone(), state.clone(), event).await; } - Err(reconnect_error) if reconnect_error.kind() == twilight_gateway::error::ReceiveMessageErrorType::Reconnect => { + Err(reconnect_error) if matches!(reconnect_error.kind(), &twilight_gateway::error::ReceiveMessageErrorType::Reconnect) => { + tracing::error!(?reconnect_error); return; } Err(error) => {