Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit fb0566f

Browse files
authored
fix(EmojiRegex): longer ids (bwmarrin#1274)
Fix EmojiRegex to accept emojis with ids up to 20 characters long
1 parent f36b543 commit fb0566f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

structs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ type Emoji struct {
508508

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

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

0 commit comments

Comments
 (0)