diff --git a/src/helpers/webhooks/deleteWebhook.ts b/src/helpers/webhooks/deleteWebhook.ts index d4b8d4470..72d84d16c 100644 --- a/src/helpers/webhooks/deleteWebhook.ts +++ b/src/helpers/webhooks/deleteWebhook.ts @@ -1,6 +1,6 @@ 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.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.WEBHOOK_ID(webhookId)); +export async function deleteWebhook(bot: Bot, channelId: bigint, webhookId: bigint, reason?: string) { + await bot.rest.runMethod(bot.rest, "delete", bot.constants.endpoints.WEBHOOK_ID(webhookId), { reason }); } diff --git a/src/types/webhooks/createWebhook.ts b/src/types/webhooks/createWebhook.ts index 5311a4a4f..843ef477f 100644 --- a/src/types/webhooks/createWebhook.ts +++ b/src/types/webhooks/createWebhook.ts @@ -3,4 +3,5 @@ export interface CreateWebhook { name: string; /** Image for the default webhook avatar */ avatar?: string | null; + reason?: string; } diff --git a/src/types/webhooks/modifyWebhook.ts b/src/types/webhooks/modifyWebhook.ts index 562589a27..099d17016 100644 --- a/src/types/webhooks/modifyWebhook.ts +++ b/src/types/webhooks/modifyWebhook.ts @@ -6,4 +6,5 @@ export interface ModifyWebhook { avatar?: string | null; /** The new channel id this webhook should be moved to */ channelId?: string; + reason?: string; }