1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-12-07 20:51:42 +00:00

discord: Support GIF banner URLs

This commit is contained in:
twoscott 2025-03-26 21:37:18 +00:00
parent b01afe1b80
commit 29f0a1ac5b

View file

@ -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 ""