From 02a16585b0348156cd39d51c7ff75bd8162aec47 Mon Sep 17 00:00:00 2001 From: Austin Hellyer Date: Sun, 8 Jan 2017 20:25:04 -0800 Subject: Update icons/splashes to be WEBP --- src/model/channel.rs | 2 +- src/model/guild.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/model') diff --git a/src/model/channel.rs b/src/model/channel.rs index 27fac25..e9d60a8 100644 --- a/src/model/channel.rs +++ b/src/model/channel.rs @@ -381,7 +381,7 @@ impl Group { /// Returns the formatted URI of the group's icon if one exists. pub fn icon_url(&self) -> Option { 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. diff --git a/src/model/guild.rs b/src/model/guild.rs index 322743e..ba0f99c 100644 --- a/src/model/guild.rs +++ b/src/model/guild.rs @@ -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 { self.icon.as_ref().map(|icon| - format!(cdn!("/icons/{}/{}.jpg"), self.id, icon)) + format!(cdn!("/icons/{}/{}.webp"), self.id, icon)) } } @@ -142,7 +142,7 @@ impl InviteGuild { #[cfg(feature="methods")] pub fn splash_url(&self) -> Option { self.icon.as_ref().map(|icon| - format!(cdn!("/splashes/{}/{}.jpg"), self.id, icon)) + format!(cdn!("/splashes/{}/{}.webp"), self.id, icon)) } } @@ -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 { 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. @@ -253,7 +253,7 @@ impl PartialGuild { #[cfg(feature="methods")] pub fn splash_url(&self) -> Option { 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. @@ -661,7 +661,7 @@ impl Guild { /// Returns the formatted URL of the guild's icon, if one exists. pub fn icon_url(&self) -> Option { 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 @@ -907,7 +907,7 @@ impl Guild { #[cfg(feature="methods")] pub fn splash_url(&self) -> Option { 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. -- cgit v1.2.3