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:
Jiralite
2023-09-18 08:29:47 +01:00
committed by GitHub
parent 32d614ccd3
commit e02a59bbb6
4 changed files with 46 additions and 13 deletions

View File

@@ -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);
}
/**