1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-03-25 19:39:52 +00:00

Separated String() and APIString() for Emoji argument

This commit is contained in:
diamondburned (Forefront) 2020-01-23 20:01:59 -08:00
parent 8ae2378484
commit 586c6ceaa4

View file

@ -19,7 +19,7 @@ type Emoji struct {
Animated bool
}
func (e Emoji) String() string {
func (e Emoji) APIString() string {
if !e.Custom {
return e.ID
}
@ -27,6 +27,18 @@ func (e Emoji) String() string {
return e.Name + ":" + e.ID
}
func (e Emoji) String() string {
if !e.Custom {
return e.ID
}
if e.Animated {
return "<a:" + e.Name + ":" + e.ID + ">"
} else {
return "<:" + e.Name + ":" + e.ID + ">"
}
}
func (e Emoji) URL() string {
if e.Custom {
return ""