mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
feat(DataResolver): account for discord.gg/invite/<code> invites
This commit is contained in:
parent
42ce4f8bc0
commit
ddab8096cf
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ class DataResolver {
|
|||
* @returns {string}
|
||||
*/
|
||||
static resolveInviteCode(data) {
|
||||
const inviteRegex = /discord(?:app\.com\/invite|\.gg)\/([\w-]{2,255})/i;
|
||||
const inviteRegex = /discord(?:app\.com\/invite|\.gg(?:\/invite)?)\/([\w-]{2,255})/i;
|
||||
const match = inviteRegex.exec(data);
|
||||
if (match && match[1]) return match[1];
|
||||
return data;
|
||||
|
|
|
|||
Loading…
Reference in a new issue