mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
refactor: Stickers are free (no more "premium" packs) (#9791)
refactor: stickers are free Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import type { RequestData, REST } from '@discordjs/rest';
|
||||
import {
|
||||
Routes,
|
||||
type RESTGetAPIStickerResult,
|
||||
type RESTGetNitroStickerPacksResult,
|
||||
type RESTGetStickerPacksResult,
|
||||
type Snowflake,
|
||||
} from 'discord-api-types/v10';
|
||||
|
||||
@@ -12,13 +12,24 @@ export class StickersAPI {
|
||||
public constructor(private readonly rest: REST) {}
|
||||
|
||||
/**
|
||||
* Fetches all of the nitro sticker packs
|
||||
* Fetches all of the sticker packs
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#list-sticker-packs}
|
||||
* @param options - The options for fetching the sticker packs
|
||||
*/
|
||||
public async getNitroStickers({ signal }: Pick<RequestData, 'signal'> = {}) {
|
||||
return this.rest.get(Routes.nitroStickerPacks(), { signal }) as Promise<RESTGetNitroStickerPacksResult>;
|
||||
public async getStickers({ signal }: Pick<RequestData, 'signal'> = {}) {
|
||||
return this.rest.get(Routes.stickerPacks(), { signal }) as Promise<RESTGetStickerPacksResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches all of the sticker packs
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#list-sticker-packs}
|
||||
* @param options - The options for fetching the sticker packs
|
||||
* @deprecated Use {@link getStickers} instead.
|
||||
*/
|
||||
public async getNitroStickers(options: Pick<RequestData, 'signal'> = {}) {
|
||||
return this.getStickers(options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user