$deleteWebhook
Deletes a webhook with a webhook URL. The bot must see the webhook and have manage webhooks permission to delete it!

FUNCTION USAGE

  • $deleteWebhook[hookURL]

Properties:

hookURL - Supply a webhookURL to delete the webhook.
Example 1: Removing a specific webhook. NOTE: this usage is practically a 1-time use since this specific webhook will be removed after execution. Please see examples 2 and 3.
1
bot.Command({
2
name: "del-hook",
3
code: `
4
$deleteWebhook[https://discord.com/api/webhooks/786218329616661952/7ieMXCLSEZo-Ihrestzh3hKracp0vCU__c8KYzwJpLDZC2ainsN4Bfq48SrF]
5
`
6
})
Copied!
Example 2: Removing a specific webhook by manually supplying the webhookURL.
1
bot.Command({
2
name: "del-hook",
3
code: `
4
$deleteWebhook[$message[]]
5
`
6
})
Copied!
Example 3: If you stored a webhookURL in a variable, you can use that variable to remove the webhook
1
bot.Command({
2
name: "del-hook",
3
code: `
4
$deleteWebhook[$getServerVar[webhook]]
5
`
6
})
Copied!
Last modified 10mo ago
Copy link
Contents
Properties: