Files
discordeno/src/helpers/webhooks/delete_webhook.ts
T
2021-10-21 17:41:47 +02:00

9 lines
437 B
TypeScript

import type {Bot} from "../../bot.ts";
/** Delete a webhook permanently. Requires the `MANAGE_WEBHOOKS` permission. Returns a undefined on success */
export async function deleteWebhook(bot: Bot, channelId: bigint, webhookId: bigint) {
await bot.utils.requireBotChannelPermissions(bot, channelId, ["MANAGE_WEBHOOKS"]);
return await bot.rest.runMethod<undefined>(bot.rset,"delete", bot.constants.endpoints.WEBHOOK_ID(webhookId));
}