1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-16 11:54:29 +00:00

Discord: Added Channel.IconURL

This commit is contained in:
diamondburned (Forefront) 2020-03-05 15:49:44 -08:00
parent ad35249b61
commit 6cd4b361ce

View file

@ -45,6 +45,17 @@ func (ch Channel) Mention() string {
return "<#" + ch.ID.String() + ">" return "<#" + ch.ID.String() + ">"
} }
// IconURL returns the icon of the channel. This function will only return
// something if ch.Icon is not empty.
func (ch Channel) IconURL() string {
if ch.Icon == "" {
return ""
}
return "https://cdn.discordapp.com/channel-icons/" +
ch.ID.String() + "/" + ch.Icon + ".png"
}
type ChannelType uint8 type ChannelType uint8
const ( const (