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:
parent
ad35249b61
commit
6cd4b361ce
|
@ -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 (
|
||||||
|
|
Loading…
Reference in a new issue