-
-
Notifications
You must be signed in to change notification settings - Fork 114
/
sticker.ts
127 lines (121 loc) · 2.7 KB
/
sticker.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/**
* Types extracted from https://discord.com/developers/docs/resources/sticker
*/
import type { APIUser } from './user.ts';
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/resources/sticker#sticker-object
*/
export interface APISticker {
/**
* ID of the sticker
*/
id: Snowflake;
/**
* For standard stickers, ID of the pack the sticker is from
*/
pack_id?: Snowflake;
/**
* Name of the sticker
*/
name: string;
/**
* Description of the sticker
*/
description: string | null;
/**
* For guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions.
*/
tags: string;
/**
* Previously the sticker asset hash, now an empty string
* @deprecated
*/
asset?: '';
/**
* Type of sticker
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
*/
type: StickerType;
/**
* Type of sticker format
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
*/
format_type: StickerFormatType;
/**
* Whether this guild sticker can be used, may be false due to loss of Server Boosts
*/
available?: boolean;
/**
* ID of the guild that owns this sticker
*/
guild_id?: Snowflake;
/**
* The user that uploaded the guild sticker
*/
user?: APIUser;
/**
* The standard sticker's sort order within its pack
*/
sort_value?: number;
}
/**
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
*/
export enum StickerType {
/**
* 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,
}
/**
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
*/
export enum StickerFormatType {
PNG = 1,
APNG,
Lottie,
}
/**
* https://discord.com/developers/docs/resources/sticker#sticker-item-object
*/
export type APIStickerItem = Pick<APISticker, 'id' | 'name' | 'format_type'>;
/**
* https://discord.com/developers/docs/resources/sticker#sticker-pack-object
*/
export interface APIStickerPack {
/**
* ID of the sticker pack
*/
id: Snowflake;
/**
* The stickers in the pack
*/
stickers: APISticker[];
/**
* Name of the sticker pack
*/
name: string;
/**
* ID of the pack's SKU
*/
sku_id: Snowflake;
/**
* ID of a sticker in the pack which is shown as the pack's icon
*/
cover_sticker_id?: Snowflake;
/**
* Description of the sticker pack
*/
description: string;
/**
* ID of the sticker pack's banner image
*/
banner_asset_id?: Snowflake;
}