From 46e4fc664a047d205c0eb7db07a2630e12b9571e Mon Sep 17 00:00:00 2001 From: byeoon <47872200+byeoon@users.noreply.github.com> Date: Wed, 15 May 2024 09:49:32 -0400 Subject: [PATCH] oopsie --- src/plugins/WebhookManager/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/WebhookManager/index.tsx b/src/plugins/WebhookManager/index.tsx index 2e206a132..9fcff3be8 100644 --- a/src/plugins/WebhookManager/index.tsx +++ b/src/plugins/WebhookManager/index.tsx @@ -35,7 +35,7 @@ export default definePlugin({ await fetch("" + findOption(option, "url"), { method: "DELETE" }).then(() => sendBotMessage(ctx.channel.id, { content: "The webhook has deleted successfully." })); } catch (error) { - if (!["discord.com", "ptb.discord.com", "canary.discord.com"].includes(findOption(option, "url")) || !pathname.startsWith("/api/webhooks/")) { + if (!["discord.com", "ptb.discord.com", "canary.discord.com"].includes(findOption(option, "url")) || !findOption(option, "url").startsWith("/api/webhooks/")) { sendBotMessage(ctx.channel.id, { content: "Please input a valid webhook URL to delete." });