From 40ce0791a8ed348189d9aefe0669cee29bf59920 Mon Sep 17 00:00:00 2001 From: Almeida Date: Fri, 24 Apr 2026 18:11:18 +0100 Subject: [PATCH] feat(ApplicationsAPI): add getActivityInstance method (#11482) feat(core): add getActivityInstance to ApplicationsAPI Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/core/src/api/applications.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/core/src/api/applications.ts b/packages/core/src/api/applications.ts index 597cfec7a..df6322eef 100644 --- a/packages/core/src/api/applications.ts +++ b/packages/core/src/api/applications.ts @@ -3,6 +3,7 @@ import type { RequestData, REST } from '@discordjs/rest'; import { Routes, + type RESTGetAPIApplicationActivityInstanceResult, type RESTGetAPIApplicationEmojiResult, type RESTGetAPIApplicationEmojisResult, type RESTGetCurrentApplicationResult, @@ -136,4 +137,23 @@ export class ApplicationsAPI { ) { await this.rest.delete(Routes.applicationEmoji(applicationId, emojiId), { auth, signal }); } + + /** + * Fetches an activity instance of an application + * + * @see {@link https://docs.discord.com/developers/resources/application#get-application-activity-instance} + * @param applicationId - The id of the application to fetch the activity instance of + * @param instanceId - The id of the activity instance to fetch + * @param options - The options for fetching the activity instance + */ + public async getActivityInstance( + applicationId: Snowflake, + instanceId: string, + { auth, signal }: Pick = {}, + ) { + return this.rest.get(Routes.applicationActivityInstance(applicationId, instanceId), { + auth, + signal, + }) as Promise; + } }