Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
fix: Mention() for animated emojis (#428)
Browse files Browse the repository at this point in the history
correct syntax for animated emojis is <a:emoji_name:1234567890>, removed the extra : which broke their mentions
  • Loading branch information
ijomeli authored Aug 21, 2021
1 parent 9bffc0b commit d2b7a7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions emoji.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ type PartialEmoji = Emoji

// Mention mentions an emoji. Adds the animation prefix, if animated
func (e *Emoji) Mention() string {
prefix := ""
prefix := ":"
if e.Animated {
prefix = "a:"
}

return "<:" + prefix + e.Name + ":" + e.ID.String() + ">"
return "<" + prefix + e.Name + ":" + e.ID.String() + ">"
}

//////////////////////////////////////////////////////
Expand Down

0 comments on commit d2b7a7d

Please sign in to comment.