diff --git a/src/helpers/channels/get_channel_webhooks.ts b/src/helpers/channels/get_channel_webhooks.ts index bdea2baf5..69fcc7825 100644 --- a/src/helpers/channels/get_channel_webhooks.ts +++ b/src/helpers/channels/get_channel_webhooks.ts @@ -1,23 +1,19 @@ import { rest } from "../../rest/rest.ts"; -import { DiscordWebhook, Webhook } from "../../types/webhooks/webhook.ts"; +import { Webhook } from "../../types/webhooks/webhook.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; -import { snakeKeysToCamelCase } from "../../util/utils.ts"; /** Gets the webhooks for this channel. Requires MANAGE_WEBHOOKS */ export async function getChannelWebhooks(channelId: string) { await requireBotChannelPermissions(channelId, ["MANAGE_WEBHOOKS"]); - const result = (await rest.runMethod( + const result = await rest.runMethod( "get", endpoints.CHANNEL_WEBHOOKS(channelId), - )) as DiscordWebhook[]; + ); return new Collection( - result.map((webhook) => [ - webhook.id, - snakeKeysToCamelCase(webhook), - ]), + result.map((webhook) => [webhook.id, webhook]), ); }