mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 17:00:08 +00:00
14 lines
495 B
TypeScript
14 lines
495 B
TypeScript
import type { Bot } from "../../bot.ts";
|
|
import type { Message } from "../../types/messages/message.ts";
|
|
|
|
/** Returns the initial Interaction response. Functions the same as Get Webhook Message */
|
|
export async function getOriginalInteractionResponse(bot: Bot, token: string) {
|
|
const result = await bot.rest.runMethod<Message>(
|
|
bot.rest,
|
|
"get",
|
|
bot.constants.endpoints.INTERACTION_ORIGINAL_ID_TOKEN(bot.applicationId, token),
|
|
);
|
|
|
|
return bot.transformers.message(bot, result);
|
|
}
|