mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
BREAKING CHANGE remove unused editWebhook function channelId parameter
and add comments to createWebhook and modifyWebhook interfaces' reason
This commit is contained in:
@@ -3,7 +3,7 @@ import type { Webhook } from "../../types/webhooks/webhook.ts";
|
||||
import type { Bot } from "../../bot.ts";
|
||||
|
||||
/** Edit a webhook. Requires the `MANAGE_WEBHOOKS` permission. Returns the updated webhook object on success. */
|
||||
export async function editWebhook(bot: Bot, channelId: bigint, webhookId: bigint, options: ModifyWebhook) {
|
||||
export async function editWebhook(bot: Bot, webhookId: bigint, options: ModifyWebhook) {
|
||||
const result = await bot.rest.runMethod<Webhook>(bot.rest, "patch", bot.constants.endpoints.WEBHOOK_ID(webhookId), {
|
||||
...options,
|
||||
channel_id: options.channelId,
|
||||
|
||||
@@ -3,5 +3,6 @@ export interface CreateWebhook {
|
||||
name: string;
|
||||
/** Image for the default webhook avatar */
|
||||
avatar?: string | null;
|
||||
/** The reason you are creating this webhook */
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@ export interface ModifyWebhook {
|
||||
avatar?: string | null;
|
||||
/** The new channel id this webhook should be moved to */
|
||||
channelId?: string;
|
||||
/** The reason you are modifying this webhook */
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user