mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-02-08 04:28:32 +00:00
Discord: Added Channel.IconURL
This commit is contained in:
parent
ad35249b61
commit
6cd4b361ce
|
@ -45,6 +45,17 @@ func (ch Channel) Mention() 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
|
||||
|
||||
const (
|
||||
|
|
Loading…
Reference in a new issue