From bb511abc03bb66848947e37a999502b813c77269 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Thu, 23 Jul 2020 23:24:17 -0700 Subject: goodbye old uwufier :cry: --- src/utils/stripWebhookURL.ts | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/utils/stripWebhookURL.ts (limited to 'src/utils/stripWebhookURL.ts') diff --git a/src/utils/stripWebhookURL.ts b/src/utils/stripWebhookURL.ts deleted file mode 100644 index 73a227c..0000000 --- a/src/utils/stripWebhookURL.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** -* Gets the ID and token for a webhook from a webhook URL from the Discord client -* @param {string} url URL for the webhook from the Discord client -* @returns {Object} Object with the webhook ID and token -*/ -module.exports = (url: string) => { - const regex = /https:\/\/discordapp\.com\/api\/webhooks\/(\d{1,})\/([\w-_]{1,})/; - const matches = regex.exec(url); - - //@ts-ignore dont care if null - return { id: matches[1], token: matches[2] }; -}; \ No newline at end of file -- cgit v1.2.3