Files
discordeno/helpers/interactions/getOriginalInteractionResponse.ts
2022-02-11 09:49:53 +00:00

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);
}