1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-01-07 04:27:18 +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 // Supported ImageTypes: PNG, GIF
func (e Emoji) EmojiURLWithType(t ImageType) string { func (e Emoji) EmojiURLWithType(t ImageType) string {
if e.ID.IsNull() { if e.IsUnicode() {
return "" return ""
} }
@ -107,8 +107,8 @@ func (e APIEmoji) PathString() string {
// APIString returns a string usable for sending over to the API. // APIString returns a string usable for sending over to the API.
func (e Emoji) APIString() APIEmoji { func (e Emoji) APIString() APIEmoji {
if !e.ID.IsValid() { if e.IsUnicode() {
return APIEmoji(e.Name) // is unicode return APIEmoji(e.Name)
} }
return NewCustomEmoji(e.ID, e.Name) return NewCustomEmoji(e.ID, e.Name)