Skip to main content

Variable: EmojiRegex

const EmojiRegex: RegExp

Regex that can capture the ID of any animated or non-animated custom Discord emoji

Raw

/^(?:<(?<animated>a)?:(?<name>\w{2,32}):)?(?<id>\d{17,21})>?$/

Remark

Capture group 1 can be used to determine whether the emoji is animated or not. It is named animated.

Remark

Capture group 2 is the name of the emoji as it is typed in a message. It is named name.

Remark

Capture group 3 is the ID of the emoji. It is named id.

Defined in

projects/utilities/packages/discord-utilities/src/lib/regexes.ts:42