mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-31 07:50:07 +00:00
10 lines
393 B
TypeScript
10 lines
393 B
TypeScript
import type { Webhook } from "../../types/webhooks/webhook.ts";
|
|
import type { Bot } from "../../bot.ts";
|
|
|
|
/** Returns the new webhook object for the given id. */
|
|
export async function getWebhook(bot: Bot, webhookId: bigint) {
|
|
const result = await bot.rest.runMethod<Webhook>(bot.rest, "get", bot.constants.endpoints.WEBHOOK_ID(webhookId));
|
|
|
|
return bot.transformers.webhook(bot, result);
|
|
}
|