From 1f8a38545b3b75fe3559540b0dad739d45b00bb0 Mon Sep 17 00:00:00 2001 From: kozabrada123 <“kozabrada123@users.noreply.github.com”> Date: Sat, 6 May 2023 10:39:16 +0200 Subject: [PATCH] Update types to fix deserialization errors --- src/api/types.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/types.rs b/src/api/types.rs index 16cccda..cf0e0c4 100644 --- a/src/api/types.rs +++ b/src/api/types.rs @@ -151,10 +151,10 @@ pub struct UserObject { mfa_enabled: Option, banner: Option, accent_color: Option, - locale: String, + locale: Option, verified: Option, email: Option, - flags: i8, + flags: String, // Not sure why flags is a string, but real responses from the gateway give this is an integer in string format premium_type: Option, public_flags: Option, } @@ -814,7 +814,7 @@ pub struct GatewayReady { pub user: UserObject, pub guilds: Vec, pub session_id: String, - pub resume_gateway_url: String, + pub resume_gateway_url: Option, pub shard: Option<(u64, u64)>, } @@ -858,4 +858,4 @@ pub struct GatewayPayload { pub t: Option, } -impl WebSocketEvent for GatewayPayload {} +impl WebSocketEvent for GatewayPayload {} \ No newline at end of file