1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-01-05 19:57:02 +00:00

discord: Emoji methods use IsUnicode()

This commit is contained in:
unknown 2021-05-26 23:02:54 +01:00 committed by diamondburned
parent 58fea822e1
commit a1ab986ded

View file

@ -76,7 +76,7 @@ func (e Emoji) EmojiURL() string {
//
// Supported ImageTypes: PNG, GIF
func (e Emoji) EmojiURLWithType(t ImageType) string {
if e.ID.IsNull() {
if e.IsUnicode() {
return ""
}
@ -107,8 +107,8 @@ func (e APIEmoji) PathString() string {
// APIString returns a string usable for sending over to the API.
func (e Emoji) APIString() APIEmoji {
if !e.ID.IsValid() {
return APIEmoji(e.Name) // is unicode
if e.IsUnicode() {
return APIEmoji(e.Name)
}
return NewCustomEmoji(e.ID, e.Name)