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:
parent
8ae2378484
commit
586c6ceaa4
|
@ -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 ""
|
||||
|
|
Loading…
Reference in a new issue