From 17cfad639d9792063738996ec40a4d2cbeb59a46 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 6 May 2020 20:49:38 -0400 Subject: [PATCH] Better invite regex --- structures/phone/PhoneCall.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structures/phone/PhoneCall.js b/structures/phone/PhoneCall.js index 95f16b24..5087175d 100644 --- a/structures/phone/PhoneCall.js +++ b/structures/phone/PhoneCall.js @@ -1,5 +1,5 @@ const { shorten, verify } = require('../../util/Util'); -const inviteRegex = /discord(\.gg|app\.com\/invite|\.me)\//gi; +const inviteRegex = /(https?:\/\/)?(www\.|canary\.|ptb\.)?discord(\.gg|app\.com\/invite|\.me)\/([^ ]+)\/?/gi; module.exports = class PhoneCall { constructor(client, origin, recipient) {