swc/crates/swc_bundler/tests/.cache/deno/41399c02aaeed4ee631f4dfaecf5954b9d505484.ts
2021-11-09 20:42:49 +09:00

14 lines
615 B
TypeScript

// Loaded from https://deno.land/x/discordeno@11.0.0-rc.2/src/helpers/webhooks/delete_webhook.ts
import { rest } from "../../rest/rest.ts";
import { endpoints } from "../../util/constants.ts";
import { requireBotChannelPermissions } from "../../util/permissions.ts";
/** Delete a webhook permanently. Requires the `MANAGE_WEBHOOKS` permission. Returns a undefined on success */
export async function deleteWebhook(channelId: bigint, webhookId: bigint) {
await requireBotChannelPermissions(channelId, ["MANAGE_WEBHOOKS"]);
return await rest.runMethod<undefined>("delete", endpoints.WEBHOOK_ID(webhookId));
}