This commit is contained in:
byeoon 2024-05-15 09:49:32 -04:00 committed by GitHub
parent e9cb2eccec
commit 46e4fc664a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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."
});