diff --git a/src/api/types.rs b/src/api/types.rs index a11f7df..8e554dd 100644 --- a/src/api/types.rs +++ b/src/api/types.rs @@ -688,3 +688,83 @@ struct TypingStartEvent { timestamp: i64, member: Option, } + +#[derive(Debug, Deserialize, Serialize)] +struct GatewayIdentifyPayload { + token: String, + properties: GatewayIdentifyConnectionProps, + compress: Option, + large_threshold: Option, //default: 50 + shard: Option>, + presence: Option, + intents: i32, +} + +#[derive(Debug, Deserialize, Serialize)] +struct GatewayIdentifyConnectionProps { + os: String, + browser: String, + device: String, +} + +#[derive(Debug, Deserialize, Serialize)] +struct PresenceUpdate { + since: Option, + activities: Vec, + status: String, + afk: bool, +} + +#[derive(Debug, Deserialize, Serialize)] +struct Activity { + name: String, + #[serde(rename = "type")] + activity_type: i32, + url: Option, + created_at: i64, + timestamps: Option, + application_id: Option, + details: Option, + state: Option, + emoji: Option, + party: Option, + assets: Option, + secrets: Option, + instance: Option, + flags: Option, + buttons: Option>, +} + +#[derive(Debug, Deserialize, Serialize)] +struct ActivityTimestamps { + start: Option, + end: Option, +} + +#[derive(Debug, Deserialize, Serialize)] +struct ActivityParty { + id: Option, + size: Option>, +} + +#[derive(Debug, Deserialize, Serialize)] +struct ActivityAssets { + large_image: Option, + large_text: Option, + small_image: Option, + small_text: Option, +} + +#[derive(Debug, Deserialize, Serialize)] +struct ActivitySecrets { + join: Option, + spectate: Option, + #[serde(rename = "match")] + match_string: Option, +} + +#[derive(Debug, Deserialize, Serialize)] +struct ActivityButton { + label: String, + url: String, +}