Skip to content

Commit

Permalink
fix(EmojiRegex): longer ids (#1274)
Browse files Browse the repository at this point in the history
Fix EmojiRegex to accept emojis with ids up to 20 characters long
  • Loading branch information
FedorLap2006 authored Nov 8, 2022
1 parent f36b543 commit fb0566f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ type Emoji struct {

// EmojiRegex is the regex used to find and identify emojis in messages
var (
EmojiRegex = regexp.MustCompile(`<(a|):[A-z0-9_~]+:[0-9]{18}>`)
EmojiRegex = regexp.MustCompile(`<(a|):[A-z0-9_~]+:[0-9]{18,20}>`)
)

// MessageFormat returns a correctly formatted Emoji for use in Message content and embeds
Expand Down

0 comments on commit fb0566f

Please sign in to comment.