summaryrefslogtreecommitdiff
path: root/src/utils/stripWebhookURL.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/stripWebhookURL.ts')
-rw-r--r--src/utils/stripWebhookURL.ts12
1 files changed, 0 insertions, 12 deletions
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