Skip to content

Commit

Permalink
Add partial application information to the Ready event. (#1139)
Browse files Browse the repository at this point in the history
Signed-off-by: Kamran Mackey <kamranm1200@gmail.com>
  • Loading branch information
Kamran Mackey committed Dec 23, 2020
1 parent 6aa2841 commit d4caf12
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/model/application.rs
Expand Up @@ -108,6 +108,18 @@ impl fmt::Debug for BotApplication {
}
}

/// Partial information about the given application.
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PartialCurrentApplicationInfo {
/// The unique Id of the user.
pub id: UserId,
/// The flags associated with the application.
///
/// These flags are unknown and are not yet documented in the Discord API
/// documentation.
pub flags: u64,
}

/// Information about the current application and its owner.
#[derive(Clone, Debug, Deserialize, Serialize)]
#[non_exhaustive]
Expand Down
1 change: 1 addition & 0 deletions src/model/gateway.rs
Expand Up @@ -605,6 +605,7 @@ impl Serialize for Presence {
#[derive(Clone, Debug, Deserialize, Serialize)]
#[non_exhaustive]
pub struct Ready {
pub application: PartialCurrentApplicationInfo,
pub guilds: Vec<GuildStatus>,
#[serde(default, serialize_with = "serialize_presences", deserialize_with = "deserialize_presences")]
pub presences: HashMap<UserId, Presence>,
Expand Down

0 comments on commit d4caf12

Please sign in to comment.