Skip to content

Commit

Permalink
Update icons/splashes to be WEBP
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Hellyer committed Jan 9, 2017
1 parent e85e901 commit 02a1658
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/model/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ impl Group {
/// Returns the formatted URI of the group's icon if one exists.
pub fn icon_url(&self) -> Option<String> {
self.icon.as_ref().map(|icon|
format!(cdn!("/channel-icons/{}/{}.jpg"), self.channel_id, icon))
format!(cdn!("/channel-icons/{}/{}.webp"), self.channel_id, icon))
}

/// Leaves the group.
Expand Down
12 changes: 6 additions & 6 deletions src/model/guild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl GuildInfo {
/// Returns the formatted URL of the guild's icon, if the guild has an icon.
pub fn icon_url(&self) -> Option<String> {
self.icon.as_ref().map(|icon|
format!(cdn!("/icons/{}/{}.jpg"), self.id, icon))
format!(cdn!("/icons/{}/{}.webp"), self.id, icon))
}
}

Expand All @@ -142,7 +142,7 @@ impl InviteGuild {
#[cfg(feature="methods")]
pub fn splash_url(&self) -> Option<String> {
self.icon.as_ref().map(|icon|
format!(cdn!("/splashes/{}/{}.jpg"), self.id, icon))
format!(cdn!("/splashes/{}/{}.webp"), self.id, icon))
}
}

Expand All @@ -169,7 +169,7 @@ impl PartialGuild {
/// Returns a formatted URL of the guild's icon, if the guild has an icon.
pub fn icon_url(&self) -> Option<String> {
self.icon.as_ref().map(|icon|
format!(cdn!("/icons/{}/{}.jpg"), self.id, icon))
format!(cdn!("/icons/{}/{}.webp"), self.id, icon))
}

/// Performs a search request to the API for the guild's [`Message`]s.
Expand Down Expand Up @@ -253,7 +253,7 @@ impl PartialGuild {
#[cfg(feature="methods")]
pub fn splash_url(&self) -> Option<String> {
self.icon.as_ref().map(|icon|
format!(cdn!("/splashes/{}/{}.jpg"), self.id, icon))
format!(cdn!("/splashes/{}/{}.webp"), self.id, icon))
}

/// Retrieves the guild's webhooks.
Expand Down Expand Up @@ -661,7 +661,7 @@ impl Guild {
/// Returns the formatted URL of the guild's icon, if one exists.
pub fn icon_url(&self) -> Option<String> {
self.icon.as_ref().map(|icon|
format!(cdn!("/icons/{}/{}.jpg"), self.id, icon))
format!(cdn!("/icons/{}/{}.webp"), self.id, icon))
}

/// Checks if the guild is 'large'. A guild is considered large if it has
Expand Down Expand Up @@ -907,7 +907,7 @@ impl Guild {
#[cfg(feature="methods")]
pub fn splash_url(&self) -> Option<String> {
self.icon.as_ref().map(|icon|
format!(cdn!("/splashes/{}/{}.jpg"), self.id, icon))
format!(cdn!("/splashes/{}/{}.webp"), self.id, icon))
}

/// Starts a prune of [`Member`]s.
Expand Down

0 comments on commit 02a1658

Please sign in to comment.