mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-30 23:40:07 +00:00
10 lines
506 B
TypeScript
10 lines
506 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, this call does not require authentication and returns no user in the webhook object. */
|
|
export async function getWebhookWithToken(bot: Bot, webhookId: bigint, token: string) {
|
|
const result = await bot.rest.runMethod<Webhook>(bot.rest, "get", bot.constants.endpoints.WEBHOOK(webhookId, token));
|
|
|
|
return bot.transformers.webhook(bot, result);
|
|
}
|