diff --git a/src/api/types.rs b/src/api/types.rs index 833691e..b3f7081 100644 --- a/src/api/types.rs +++ b/src/api/types.rs @@ -620,7 +620,7 @@ pub struct MessageActivity { pub party_id: Option, } -#[derive(Debug, Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize, Clone)] pub struct Application { pub id: String, pub name: String, @@ -646,7 +646,7 @@ pub struct Application { pub role_connections_verification_url: Option, } -#[derive(Debug, Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize, Clone)] pub struct Team { pub icon: Option, pub id: u64, @@ -655,7 +655,7 @@ pub struct Team { pub owner_user_id: u64, } -#[derive(Debug, Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize, Clone)] pub struct TeamMember { pub membership_state: u8, pub permissions: Vec, @@ -670,7 +670,7 @@ pub enum MembershipState { Accepted = 2, } -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize, Clone)] pub struct InstallParams { pub scopes: Vec, pub permissions: String, @@ -786,6 +786,65 @@ pub struct ThreadMember { pub member: Option, } +#[derive(Default, Debug, Deserialize, Serialize, Clone)] +/// See https://discord.com/developers/docs/resources/guild#integration-object-integration-structure +pub struct Integration { + pub id: String, + pub name: String, + #[serde(rename = "type")] + pub integration_type: String, + pub enabled: bool, + pub syncing: Option, + pub role_id: Option, + pub enabled_emoticons: Option, + pub expire_behaviour: Option, + pub expire_grace_period: Option, + pub user: Option, + pub account: IntegrationAccount, + pub synced_at: Option>, + pub subscriber_count: Option, + pub revoked: Option, + pub application: Option, + pub scopes: Option> +} + +#[derive(Default, Debug, Deserialize, Serialize, Clone)] +/// See https://discord.com/developers/docs/resources/guild#integration-account-object-integration-account-structure +pub struct IntegrationAccount { + pub id: 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, + 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,