mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
add capture groups to MessageMentions and validate snowflake ranges (#1612)
* add capture groups * update patterns to valid snowflake ranges
This commit is contained in:
parent
9c2e3b8978
commit
2c763073d7
1 changed files with 3 additions and 3 deletions
|
|
@ -144,18 +144,18 @@ MessageMentions.EVERYONE_PATTERN = /@(everyone|here)/g;
|
|||
* Regular expression that globally matches user mentions like `<@81440962496172032>`
|
||||
* @type {RegExp}
|
||||
*/
|
||||
MessageMentions.USERS_PATTERN = /<@!?[0-9]+>/g;
|
||||
MessageMentions.USERS_PATTERN = /<@!?(1|\d{17,19})>/g;
|
||||
|
||||
/**
|
||||
* Regular expression that globally matches role mentions like `<@&297577916114403338>`
|
||||
* @type {RegExp}
|
||||
*/
|
||||
MessageMentions.ROLES_PATTERN = /<@&[0-9]+>/g;
|
||||
MessageMentions.ROLES_PATTERN = /<@&(\d{17,19})>/g;
|
||||
|
||||
/**
|
||||
* Regular expression that globally matches channel mentions like `<#222079895583457280>`
|
||||
* @type {RegExp}
|
||||
*/
|
||||
MessageMentions.CHANNELS_PATTERN = /<#([0-9]+)>/g;
|
||||
MessageMentions.CHANNELS_PATTERN = /<#(\d{17,19})>/g;
|
||||
|
||||
module.exports = MessageMentions;
|
||||
|
|
|
|||
Loading…
Reference in a new issue