From a93962b667a25525bb90a6344292f5d7573626ef Mon Sep 17 00:00:00 2001 From: kozabrada123 <“kozabrada123@users.noreply.github.com”> Date: Sat, 13 May 2023 22:01:04 +0200 Subject: [PATCH] Add Stage Instance and Voice State --- src/api/types.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/api/types.rs b/src/api/types.rs index 582917a..b3f7081 100644 --- a/src/api/types.rs +++ b/src/api/types.rs @@ -815,6 +815,36 @@ pub struct IntegrationAccount { pub name: String } +#[derive(Default, Debug, Deserialize, Serialize, Clone)] +/// See https://discord.com/developers/docs/resources/voice#voice-state-object +pub struct VoiceStateObject { + pub guild_id: Option, + pub channel_id: Option, + pub user_id: String, + pub member: Option, + pub session_id: String, + pub deaf: bool, + pub mute: bool, + pub self_deaf: bool, + pub self_mute: bool, + pub self_stream: Option, + pub self_video: bool, + pub suppress: bool, + pub request_to_speak_timestamp: DateTime +} + +#[derive(Default, Debug, Deserialize, Serialize, Clone)] +/// See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object +pub struct StageInstance { + pub id: String, + pub guild_id: String, + pub channel_id: String, + pub topic: String, + pub privacy_level: u8, + pub discoverable_disabled: bool, + pub guild_scheduled_event_id: Option +} + #[derive(Debug, Deserialize, Serialize, Clone)] pub struct DefaultReaction { pub emoji_id: Option,