fix: add missing (*Guild).BannerURL() method (#1023)

Signed-off-by: AKP <tom@tdpain.net>
This commit is contained in:
AKU 2021-10-28 00:56:26 +01:00 committed by GitHub
parent f0b7e81468
commit 007bf76790
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -645,6 +645,14 @@ func (g *Guild) IconURL() string {
return EndpointGuildIcon(g.ID, g.Icon) return EndpointGuildIcon(g.ID, g.Icon)
} }
// BannerURL returns a URL to the guild's banner.
func (g *Guild) BannerURL() string {
if g.Banner == "" {
return ""
}
return EndpointGuildBanner(g.ID, g.Banner)
}
// A UserGuild holds a brief version of a Guild // A UserGuild holds a brief version of a Guild
type UserGuild struct { type UserGuild struct {
ID string `json:"id"` ID string `json:"id"`