From 3ebedc577035f47adf786415a6be4d78cef5e707 Mon Sep 17 00:00:00 2001 From: Bsian Date: Sun, 3 Nov 2024 20:51:03 +0000 Subject: [PATCH] get sticker pack --- index.d.ts | 1 + lib/Client.js | 9 +++++++++ lib/rest/Endpoints.js | 1 + 3 files changed, 11 insertions(+) diff --git a/index.d.ts b/index.d.ts index 9031728a1..46b21a114 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2351,6 +2351,7 @@ declare namespace Eris { getSelf(): Promise; getSoundboardSounds(): Promise[]>; getStageInstance(channelID: string): Promise; + getStickerPack(packID: string): Promise; getThreadMember(channelID: string, userID: string, withMember?: boolean): Promise; getThreadMembers(channelID: string, options?: GetThreadMembersOptions): Promise; getVoiceRegions(guildID?: string): Promise; diff --git a/lib/Client.js b/lib/Client.js index c335d07a6..2ef6db627 100644 --- a/lib/Client.js +++ b/lib/Client.js @@ -3386,6 +3386,15 @@ class Client extends EventEmitter { return this.requestHandler.request("GET", Endpoints.STAGE_INSTANCE(channelID), true).then((instance) => new StageInstance(instance, this)); } + /** + * Get a sticker pack + * @arg {String} packID The ID of the pack + * @returns {Promise} An object representing the [sticker pack](https://discord.dev/resources/sticker#sticker-pack-object) + */ + getStickerPack(packID) { + return this.requestHandler.request("GET", Endpoints.STICKER_PACK(packID), true); + } + /** * Get a member that is part of a thread channel * @arg {String} channelID The ID of the thread channel diff --git a/lib/rest/Endpoints.js b/lib/rest/Endpoints.js index 97d08b4d2..5d7a3c7d7 100644 --- a/lib/rest/Endpoints.js +++ b/lib/rest/Endpoints.js @@ -94,6 +94,7 @@ module.exports.SOUNDBOARD_SOUNDS_SEND = (channelID) module.exports.STAGE_INSTANCE = (channelID) => `/stage-instances/${channelID}`; module.exports.STAGE_INSTANCES = "/stage-instances"; module.exports.STICKER = (stickerID) => `/stickers/${stickerID}`; +module.exports.STICKER_PACK = (packID) => `/sticker-packs/${packID}`; module.exports.STICKER_PACKS = "/sticker-packs"; module.exports.THREAD_MEMBER = (channelID, userID) => `/channels/${channelID}/thread-members/${userID}`; module.exports.THREAD_MEMBERS = (channelID) => `/channels/${channelID}/thread-members`;