Skip to content

Commit

Permalink
fix(EmojiRegex): longer ids (bwmarrin#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 and LWCoder committed Apr 11, 2023
1 parent 34c5917 commit e4510da
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 e4510da

Please sign in to comment.