From fb0566fac229dbd9a73025be03925c0837e90944 Mon Sep 17 00:00:00 2001 From: Fedor Lapshin Date: Tue, 8 Nov 2022 23:30:53 +0300 Subject: [PATCH] fix(EmojiRegex): longer ids (#1274) Fix EmojiRegex to accept emojis with ids up to 20 characters long --- structs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structs.go b/structs.go index 5bd4ce7..f2cdc69 100644 --- a/structs.go +++ b/structs.go @@ -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