mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 08:20:08 +00:00
9 lines
440 B
TypeScript
9 lines
440 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.rest, "delete", bot.constants.endpoints.WEBHOOK_ID(webhookId));
|
|
}
|