1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};

use crate::{
    entities::{Channel, Guild, GuildMember, User},
    utils::Snowflake,
};

/// See https://docs.spacebar.chat/routes/#cmp--schemas-voicestate
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
pub struct VoiceState {
    pub guild_id: Snowflake,
    pub guild: Option<Guild>,
    pub channel_id: Snowflake,
    pub channel: Option<Channel>,
    pub user_id: Snowflake,
    pub user: Option<User>,
    pub member: Option<GuildMember>,
    pub session_id: Snowflake,
    pub token: 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>>,
    pub id: Snowflake,
}