Skip to main content

Variable: FormattedCustomEmojiWithGroups

const FormattedCustomEmojiWithGroups: RegExp

Regex that can capture any animated or non-animated custom Discord emoji. Similar to FormattedCustomEmoji and unlike EmojiRegex can also be a substring of a larger string.

Raw

/(?<animated>a?):(?<name>[^:]+):(?<id>\d{17,20})/

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:59