mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
add: getOriginalinteractionResponse
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user