From 420624c428e014659390c21e6cee53d8ef628fc1 Mon Sep 17 00:00:00 2001 From: kozabrada123 <“kozabrada123@users.noreply.github.com”> Date: Sat, 27 May 2023 17:31:55 +0200 Subject: [PATCH] Better unrecognised messages --- src/gateway.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gateway.rs b/src/gateway.rs index 675a443..2ea383a 100644 --- a/src/gateway.rs +++ b/src/gateway.rs @@ -506,8 +506,7 @@ impl Gateway { self.events.lock().await.webhooks.update.update_data(new_data).await; } _ => { - //panic!("Invalid gateway event ({})", &gateway_payload_t) - println!("New gateway event ({})", &gateway_payload_t); + println!("Received unrecognised gateway event ({})! Please open an issue on the chorus github so we can implement it", &gateway_payload_t); } } } @@ -532,8 +531,8 @@ impl Gateway { 11 => { println!("GW: Received Heartbeat ACK"); } - 2 | 3 | 4 | 6 | 8 => {panic!("Received Gateway op code that's meant to be sent, not received ({})", gateway_payload.op)} - _ => {println!("Received new Gateway op code ({})", gateway_payload.op);} + 2 | 3 | 4 | 6 | 8 => {panic!("Received gateway op code that's meant to be sent, not received ({})", gateway_payload.op)} + _ => {println!("Received unrecognised gateway op code ({})! Please open an issue on the chorus github so we can implement it", gateway_payload.op);} } // If we have an active heartbeat thread and we received a seq number we should let it know