mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 08:20:08 +00:00
Merge pull request #1861 from lts20050703/#1851-Denotes-sticker_pack.banner_asset_id-as-optional
move to /src/types/stickers, add StickerTypes enum and StickerPack interface, rename interfaces, enum, and file names, and update jsdoc comments
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
import { MessageStickerFormatTypes } from "./messageStickerFormatTypes.ts";
|
||||
import type { User } from "../users/user.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/resources/channel#message-object-message-sticker-structure */
|
||||
export interface MessageSticker {
|
||||
/** Id of the sticker */
|
||||
id: string;
|
||||
/** Id of the pack the sticker is from */
|
||||
packId?: string;
|
||||
/** Name of the sticker */
|
||||
name: string;
|
||||
/** Description of the sticker */
|
||||
description: string;
|
||||
/** a unicode emoji representing the sticker's expression */
|
||||
tags: string;
|
||||
/** Type of sticker format */
|
||||
formatType: MessageStickerFormatTypes;
|
||||
/** Whether or not the sticker is available */
|
||||
available?: boolean;
|
||||
/** Id of the guild that owns this sticker */
|
||||
guildId?: string;
|
||||
/** The user that uploaded the sticker */
|
||||
user?: User;
|
||||
/** A sticker's sort order within a pack */
|
||||
sortValue?: number;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
/** https://discord.com/developers/docs/resources/channel#message-object-message-sticker-format-types */
|
||||
export enum MessageStickerFormatTypes {
|
||||
Png = 1,
|
||||
Apng,
|
||||
Lottie,
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import { MessageStickerFormatTypes } from "./messageStickerFormatTypes.ts";
|
||||
|
||||
export interface MessageStickerItem {
|
||||
/** Id of the sticker */
|
||||
id: string;
|
||||
/** Name of the sticker */
|
||||
name: string;
|
||||
/** Type of sticker format */
|
||||
formatType: MessageStickerFormatTypes;
|
||||
}
|
||||
29
src/types/stickers/sticker.ts
Normal file
29
src/types/stickers/sticker.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { StickerFormatTypes } from "./stickerFormatTypes.ts";
|
||||
import type { StickerTypes } from "./stickerTypes.ts";
|
||||
import type { User } from "../users/user.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-structure */
|
||||
export interface Sticker {
|
||||
/** [Id of the sticker](https://discord.com/developers/docs/reference#image-formatting) */
|
||||
id: string;
|
||||
/** Id of the pack the sticker is from */
|
||||
packId?: string;
|
||||
/** Name of the sticker */
|
||||
name: string;
|
||||
/** Description of the sticker */
|
||||
description: string;
|
||||
/** a unicode emoji representing the sticker's expression */
|
||||
tags: string;
|
||||
/** [type of sticker](https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types) */
|
||||
type: StickerTypes;
|
||||
/** [Type of sticker format](https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types) */
|
||||
formatType: StickerFormatTypes;
|
||||
/** Whether or not the sticker is available */
|
||||
available?: boolean;
|
||||
/** Id of the guild that owns this sticker */
|
||||
guildId?: string;
|
||||
/** The user that uploaded the sticker */
|
||||
user?: User;
|
||||
/** A sticker's sort order within a pack */
|
||||
sortValue?: number;
|
||||
}
|
||||
6
src/types/stickers/stickerFormatTypes.ts
Normal file
6
src/types/stickers/stickerFormatTypes.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types */
|
||||
export enum StickerFormatTypes {
|
||||
Png = 1,
|
||||
Apng,
|
||||
Lottie,
|
||||
}
|
||||
11
src/types/stickers/stickerItem.ts
Normal file
11
src/types/stickers/stickerItem.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { StickerFormatTypes } from "./stickerFormatTypes.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/resources/sticker#sticker-item-object-sticker-item-structure */
|
||||
export interface StickerItem {
|
||||
/** Id of the sticker */
|
||||
id: string;
|
||||
/** Name of the sticker */
|
||||
name: string;
|
||||
/** [Type of sticker format](https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types) */
|
||||
formatType: StickerFormatTypes;
|
||||
}
|
||||
19
src/types/stickers/stickerPack.ts
Normal file
19
src/types/stickers/stickerPack.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Sticker } from "./sticker.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/resources/sticker#sticker-pack-object-sticker-pack-structure */
|
||||
export interface StickerPack {
|
||||
/** id of the sticker pack */
|
||||
id: string;
|
||||
/** the stickers in the pack */
|
||||
stickers: Sticker[];
|
||||
/** name of the sticker pack */
|
||||
name: string;
|
||||
/** id of the pack's SKU */
|
||||
sku_id: string;
|
||||
/** id of a sticker in the pack which is shown as the pack's icon */
|
||||
cover_sticker_id?: string;
|
||||
/** description of the sticker pack */
|
||||
description: string;
|
||||
/** id of the sticker pack's [banner image](https://discord.com/developers/docs/reference#image-formatting) */
|
||||
banner_asset_id?: string;
|
||||
}
|
||||
7
src/types/stickers/stickerTypes.ts
Normal file
7
src/types/stickers/stickerTypes.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types */
|
||||
export enum StickerTypes {
|
||||
/** an official sticker in a pack, part of Nitro or in a removed purchasable pack */
|
||||
Standard = 1,
|
||||
/** a sticker uploaded to a Boosted guild for the guild's members */
|
||||
Guild,
|
||||
}
|
||||
Reference in New Issue
Block a user