mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
feat: move internal regular expressions to static properties (#5384)
This commit is contained in:
@@ -222,4 +222,10 @@ class GuildTemplate extends Base {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Regular expression that globally matches guild template links
|
||||
* @type {RegExp}
|
||||
*/
|
||||
GuildTemplate.GUILD_TEMPLATES_PATTERN = /discord(?:app)?\.(?:com\/template|new)\/([\w-]{2,255})/gi;
|
||||
|
||||
module.exports = GuildTemplate;
|
||||
|
||||
@@ -191,4 +191,10 @@ class Invite extends Base {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Regular expression that globally matches Discord invite links
|
||||
* @type {RegExp}
|
||||
*/
|
||||
Invite.INVITES_PATTERN = /discord(?:(?:app)?\.com\/invite|\.gg(?:\/invite)?)\/([\w-]{2,255})/gi;
|
||||
|
||||
module.exports = Invite;
|
||||
|
||||
Reference in New Issue
Block a user