Duplicate VoiceState

This commit is contained in:
kozabrada123 2023-05-20 08:59:14 +02:00
parent 50fb208023
commit 1a98e7db6b
1 changed files with 5 additions and 23 deletions

View File

@ -912,24 +912,6 @@ pub struct IntegrationAccount {
pub name: String, 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<String>,
pub channel_id: Option<String>,
pub user_id: String,
pub member: Option<GuildMember>,
pub session_id: String,
pub deaf: bool,
pub mute: bool,
pub self_deaf: bool,
pub self_mute: bool,
pub self_stream: Option<bool>,
pub self_video: bool,
pub suppress: bool,
pub request_to_speak_timestamp: Option<DateTime<Utc>>
}
#[derive(Default, Debug, Deserialize, Serialize, Clone)] #[derive(Default, Debug, Deserialize, Serialize, Clone)]
/// See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object /// See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object
pub struct StageInstance { pub struct StageInstance {
@ -1199,7 +1181,7 @@ pub struct MergedPresenceGuild {
#[derive(Debug, Deserialize, Serialize, Default)] #[derive(Debug, Deserialize, Serialize, Default)]
pub struct SupplimentalGuild { pub struct SupplimentalGuild {
pub voice_states: Vec<VoiceStateObject>, pub voice_states: Vec<VoiceState>,
pub id: String, pub id: String,
pub embedded_activities: Vec<serde_json::Value> pub embedded_activities: Vec<serde_json::Value>
} }
@ -1620,7 +1602,7 @@ impl WebSocketEvent for IntegrationDelete {}
/// Is sent to a client by the server to signify a new being created /// Is sent to a client by the server to signify a new being created
/// {"t":"CALL_CREATE","s":2,"op":0,"d":{"voice_states":[],"ringing":[],"region":"milan","message_id":"1107187514906775613","embedded_activities":[],"channel_id":"837609115475771392"}} /// {"t":"CALL_CREATE","s":2,"op":0,"d":{"voice_states":[],"ringing":[],"region":"milan","message_id":"1107187514906775613","embedded_activities":[],"channel_id":"837609115475771392"}}
pub struct CallCreate { pub struct CallCreate {
pub voice_states: Vec<VoiceStateObject>, pub voice_states: Vec<VoiceState>,
/// Seems like a vec of channel ids /// Seems like a vec of channel ids
pub ringing: Vec<String>, pub ringing: Vec<String>,
pub region: String, // milan pub region: String, // milan
@ -1908,7 +1890,7 @@ pub struct GuildInvite {
/// See https://docs.spacebar.chat/routes/#cmp--schemas-voicestate /// See https://docs.spacebar.chat/routes/#cmp--schemas-voicestate
#[derive(Serialize, Deserialize, Debug, Default, Clone)] #[derive(Serialize, Deserialize, Debug, Default, Clone)]
pub struct VoiceState { pub struct VoiceState {
pub guild_id: String, pub guild_id: Option<String>,
pub guild: Option<Guild>, pub guild: Option<Guild>,
pub channel_id: String, pub channel_id: String,
pub channel: Option<Channel>, pub channel: Option<Channel>,
@ -1916,7 +1898,7 @@ pub struct VoiceState {
pub user: Option<UserObject>, pub user: Option<UserObject>,
pub member: Option<GuildMember>, pub member: Option<GuildMember>,
pub session_id: String, pub session_id: String,
pub token: String, pub token: Option<String>,
pub deaf: bool, pub deaf: bool,
pub mute: bool, pub mute: bool,
pub self_deaf: bool, pub self_deaf: bool,
@ -1925,7 +1907,7 @@ pub struct VoiceState {
pub self_video: bool, pub self_video: bool,
pub suppress: bool, pub suppress: bool,
pub request_to_speak_timestamp: Option<DateTime<Utc>>, pub request_to_speak_timestamp: Option<DateTime<Utc>>,
pub id: String, pub id: Option<String>,
} }
/// See https://docs.spacebar.chat/routes/#cmp--schemas-webhook /// See https://docs.spacebar.chat/routes/#cmp--schemas-webhook