diff --git a/structs.go b/structs.go index 5688cac..b4baa6b 100644 --- a/structs.go +++ b/structs.go @@ -645,6 +645,14 @@ func (g *Guild) IconURL() string { 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 type UserGuild struct { ID string `json:"id"`