add: getOriginalinteractionResponse

This commit is contained in:
ITOH
2021-05-04 22:06:32 +02:00
parent ff1eb2e6f2
commit dd8baf93f5
@@ -0,0 +1,15 @@
import { applicationId } from "../../bot.ts";
import { rest } from "../../rest/rest.ts";
import { structures } from "../../structures/mod.ts";
import type { Message } from "../../types/messages/message.ts";
import { endpoints } from "../../util/constants.ts";
/** Returns the initial Interactio response. Functions the same as Get Webhook Message */
export async function getOriginalInteractionResponse(token: string) {
const result = await rest.runMethod<Message>(
"get",
endpoints.INTERACTION_ORIGINAL_ID_TOKEN(applicationId, token),
);
return await structures.createDiscordenoMessage(result);
}