diff --git a/bot/extras/arguments/emoji.go b/bot/extras/arguments/emoji.go index cdbc19a..39002db 100644 --- a/bot/extras/arguments/emoji.go +++ b/bot/extras/arguments/emoji.go @@ -19,6 +19,28 @@ type Emoji struct { Animated bool } +func (e Emoji) String() string { + if !e.Custom { + return e.ID + } + + return e.Name + ":" + e.ID +} + +func (e Emoji) URL() string { + if e.Custom { + return "" + } + + base := "https://cdn.discordapp.com/emojis/" + e.ID + + if e.Animated { + return base + ".gif" + } else { + return base + ".png" + } +} + func (e *Emoji) Parse(arg string) error { // Check if Unicode var unicode string