From 29f0a1ac5b84a2fccfa3a3d5f1f1ccf61d801f0d Mon Sep 17 00:00:00 2001 From: twoscott Date: Wed, 26 Mar 2025 21:37:18 +0000 Subject: [PATCH] discord: Support GIF banner URLs --- discord/guild.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/discord/guild.go b/discord/guild.go index b1e4667c..e4dbca07 100644 --- a/discord/guild.go +++ b/discord/guild.go @@ -142,15 +142,16 @@ func (g Guild) IconURLWithType(t ImageType) string { } // BannerURL returns the URL to the banner, which is the image on top of the -// channels list. This will always return a link to a PNG file. +// channels list. Auto detects a suitable image type. An empty string is +// returned if the guild has no banner. func (g Guild) BannerURL() string { - return g.BannerURLWithType(PNGImage) + return g.BannerURLWithType(AutoImage) } // BannerURLWithType returns the URL to the banner, which is the image on top // of the channels list using the passed image type. // -// Supported ImageTypes: PNG, JPEG, WebP +// Supported ImageTypes: PNG, JPEG, WebP, GIF func (g Guild) BannerURLWithType(t ImageType) string { if g.Banner == "" { return ""