mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 09:50:07 +00:00
Document X-Audit-Log-Reason on webhook endpoints
This commit is contained in:
@@ -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<undefined>(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<undefined>(bot.rest, "delete", bot.constants.endpoints.WEBHOOK_ID(webhookId), { reason });
|
||||
}
|
||||
|
||||
@@ -3,4 +3,5 @@ export interface CreateWebhook {
|
||||
name: string;
|
||||
/** Image for the default webhook avatar */
|
||||
avatar?: string | null;
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
@@ -6,4 +6,5 @@ export interface ModifyWebhook {
|
||||
avatar?: string | null;
|
||||
/** The new channel id this webhook should be moved to */
|
||||
channelId?: string;
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user