mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
fix: allow the Util#parseEmoji regex to match emoji identifier (#2229)
This commit is contained in:
parent
780a311c0a
commit
2318812f7f
1 changed files with 1 additions and 1 deletions
|
|
@ -78,7 +78,7 @@ class Util {
|
|||
static parseEmoji(text) {
|
||||
if (text.includes('%')) text = decodeURIComponent(text);
|
||||
if (!text.includes(':')) return { animated: false, name: text, id: null };
|
||||
const m = text.match(/<?(a)?:(\w{2,32}):(\d{17,19})>?/);
|
||||
const m = text.match(/<?(a)?:?(\w{2,32}):(\d{17,19})>?/);
|
||||
if (!m) return null;
|
||||
return { animated: Boolean(m[1]), name: m[2], id: m[3] };
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue