fix: have to use match to detect ReceiveMessageErrorType
This commit is contained in:
@@ -344,7 +344,8 @@ async fn handle_events(command_router: Arc<CommandRouter>, 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) => {
|
||||
|
||||
Reference in New Issue
Block a user