Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement FormatPatterns #79

Merged
merged 6 commits into from
Feb 2, 2021
Merged

feat: implement FormatPatterns #79

merged 6 commits into from
Feb 2, 2021

Conversation

Fyko
Copy link
Contributor

@Fyko Fyko commented Jan 31, 2021

This PR creates a common object of message formats as regexes.
https://discord.com/developers/docs/reference#message-formatting-formats

common/index.ts Outdated Show resolved Hide resolved
common/index.ts Outdated Show resolved Hide resolved
common/index.ts Outdated Show resolved Hide resolved
@Fyko Fyko requested a review from vladfrangu January 31, 2021 18:20
common/index.ts Outdated Show resolved Hide resolved
common/index.ts Outdated
Comment on lines 179 to 181
Emoji: /<?(a)?:?(\w{2,32}):(\d{17,19})>?/,
AnimatedEmoji: /<(a):(\w{2,32}):(\d{17,19})>?/,
StaticEmoji: /<:(\w{2,32}):(\d{17,19})>?/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Emoji: /<?(a)?:?(\w{2,32}):(\d{17,19})>?/,
AnimatedEmoji: /<(a):(\w{2,32}):(\d{17,19})>?/,
StaticEmoji: /<:(\w{2,32}):(\d{17,19})>?/,
Emoji: /<(a)?:(\w{2,32}):(\d{17,19})>/,
AnimatedEmoji: /<(a):(\w{2,32}):(\d{17,19})>/,
StaticEmoji: /<:(\w{2,32}):(\d{17,19})>/,

those aren't optional for the other mention patterns either

common/index.ts Outdated Show resolved Hide resolved
@Fyko Fyko requested a review from vladfrangu February 1, 2021 02:02
@vladfrangu vladfrangu merged commit 4e4a084 into discordjs:main Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants