From 2ee421d57efc91af57e589f0ce4a9bef59c75174 Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Tue, 14 Nov 2023 16:55:23 +0100 Subject: [PATCH] Generate snowflake if not exists --- src/types/entities/voice_state.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/types/entities/voice_state.rs b/src/types/entities/voice_state.rs index e764296..74db949 100644 --- a/src/types/entities/voice_state.rs +++ b/src/types/entities/voice_state.rs @@ -38,5 +38,6 @@ pub struct VoiceState { pub self_video: bool, pub suppress: bool, pub request_to_speak_timestamp: Option>, - pub id: Snowflake, + #[serde(default = "Snowflake::generate")] + pub id: Snowflake, // Only exists on Spacebar }