Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2366,6 +2366,7 @@ declare namespace Eris {
getMessages(channelID: string, options?: GetMessagesOptions): Promise<Message[]>;
/** @deprecated */
getMessages(channelID: string, limit?: number, before?: string, after?: string, around?: string): Promise<Message[]>;
/** @deprecated */
getNitroStickerPacks(): Promise<{ sticker_packs: StickerPack[] }>;
getOAuthApplication(): Promise<OAuthApplicationInfo>;
getPins(channelID: string): Promise<Message[]>;
Expand Down Expand Up @@ -2395,6 +2396,7 @@ declare namespace Eris {
getSoundboardSounds(): Promise<SoundboardSound<false>[]>;
getStageInstance(channelID: string): Promise<StageInstance>;
getStickerPack(packID: string): Promise<StickerPack>;
getStickerPacks(): Promise<{ sticker_packs: StickerPack[] }>;
getThreadMember(channelID: string, userID: string, withMember?: boolean): Promise<ThreadMember>;
getThreadMembers(channelID: string, options?: GetThreadMembersOptions): Promise<ThreadMember[]>;
getVoiceRegions(guildID?: string): Promise<VoiceRegion[]>;
Expand Down
15 changes: 12 additions & 3 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3093,11 +3093,12 @@ class Client extends EventEmitter {
}

/**
* Get the list of sticker packs available to Nitro subscribers
* @returns {Promise<Object>} An object whichs contains a value which contains an array of sticker packs
* [DEPRECATED] Get the list of available sticker packs. This function is deprecated, use `getStickerPacks()` instead.
* @returns {Promise<{sticker_packs: Array<Object>}>} An object containing a `sticker_packs` value which contains an array of sticker packs
*/
getNitroStickerPacks() {
return this.requestHandler.request("GET", Endpoints.STICKER_PACKS, true);
emitDeprecation("GET_NITRO_STICKER_PACKS");
return this.getStickerPacks();
}

/**
Expand Down Expand Up @@ -3416,6 +3417,14 @@ class Client extends EventEmitter {
return this.requestHandler.request("GET", Endpoints.STICKER_PACK(packID), true);
}

/**
* Get the list of available sticker packs
* @returns {Promise<{sticker_packs: Array<Object>}>} An object containing a `sticker_packs` value which contains an array of sticker packs
*/
getStickerPacks() {
return this.requestHandler.request("GET", Endpoints.STICKER_PACKS, true);
}

/**
* Get a member that is part of a thread channel
* @arg {String} channelID The ID of the thread channel
Expand Down
1 change: 1 addition & 0 deletions lib/util/emitDeprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const warningMessages = {
DELETE_MESSAGE_DAYS: "Passing the deleteMessageDays parameter to banGuildMember is deprecated. Use an options object with deleteMessageSeconds instead.",
DM_REACTION_REMOVE: "Passing a userID when using removeMessageReaction() in a DMChannel is deprecated. This behavior is no longer supported by Discord.",
GET_REACTION_BEFORE: "Passing the before parameter to getMessageReaction() is deprecated. Discord no longer supports this parameter.",
GET_NITRO_STICKER_PACKS: "getNitroStickerPacks() is deprecated because standard sticker packs are no longer Nitro locked. Use getStickerPacks() instead.",
MEMBER_PERMISSION: "Member#permission is deprecated. Use Member#permissions instead.",
MESSAGE_REFERENCE: "Passing the content.messageReferenceID option to createMessage() is deprecated. Use the content.messageReference option instead.",
REACTION_USER: "Passing a userID other than \"@me\" to addMessageReaction() is deprecated. Discord no longer supports this parameter.",
Expand Down