lunibee 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/builders/attachment.d.ts +5 -1
- package/dist/builders/commands.d.ts +131 -45
- package/dist/builders/components.d.ts +164 -45
- package/dist/builders/embed.d.ts +5 -1
- package/dist/builders/index.d.ts +9 -4
- package/dist/builders/index.js +197 -105
- package/dist/builders/index.js.map +8 -8
- package/dist/core/events.d.ts +28 -12
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +183 -56
- package/dist/core/index.js.map +13 -13
- package/dist/core/permissions.d.ts +6 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +413 -168
- package/dist/index.js.map +17 -17
- package/dist/managers/index.d.ts +5 -1
- package/dist/managers/index.js +30 -14
- package/dist/managers/index.js.map +9 -9
- package/dist/managers/message.d.ts +7 -3
- package/dist/rest/index.js +2 -2
- package/dist/rest/index.js.map +1 -1
- package/dist/sharding/index.js +3 -2
- package/dist/sharding/index.js.map +4 -4
- package/dist/structures/index.d.ts +9 -3
- package/dist/structures/index.js +126 -28
- package/dist/structures/index.js.map +9 -9
- package/dist/structures/interactions.d.ts +85 -11
- package/dist/structures/resources.d.ts +11 -1
- package/dist/types/gateway.d.ts +14 -0
- package/dist/types/index.d.ts +179 -16
- package/dist/types/index.js +37 -10
- package/dist/types/index.js.map +4 -4
- package/dist/ws/index.js +2 -1
- package/dist/ws/index.js.map +4 -4
- package/package.json +14 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { ButtonType } from "@lunibee/types";
|
|
2
|
+
export { ButtonType };
|
|
3
3
|
/** Component type constants exposed by Lunibee. */
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const ComponentEnum: {
|
|
5
5
|
readonly ActionRow: 1;
|
|
6
6
|
readonly Button: 2;
|
|
7
7
|
readonly StringSelect: 3;
|
|
@@ -19,21 +19,21 @@ export declare const ComponentType: {
|
|
|
19
19
|
readonly ContentInventoryEntry: 16;
|
|
20
20
|
readonly Container: 17;
|
|
21
21
|
};
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const TextInputType: {
|
|
23
23
|
readonly Short: 1;
|
|
24
24
|
readonly Paragraph: 2;
|
|
25
25
|
};
|
|
26
|
-
/** One {@link
|
|
27
|
-
export type
|
|
28
|
-
/** One {@link
|
|
29
|
-
export type
|
|
26
|
+
/** One {@link TextInputType} value, usable as a type. */
|
|
27
|
+
export type TextInputType = (typeof TextInputType)[keyof typeof TextInputType];
|
|
28
|
+
/** One {@link ComponentEnum} value, usable as a type. */
|
|
29
|
+
export type ComponentEnum = (typeof ComponentEnum)[keyof typeof ComponentEnum];
|
|
30
30
|
export interface APIComponentEmoji {
|
|
31
31
|
id?: string | null;
|
|
32
32
|
name?: string | null;
|
|
33
33
|
animated?: boolean;
|
|
34
34
|
}
|
|
35
35
|
export interface APIButtonComponent {
|
|
36
|
-
type: typeof
|
|
36
|
+
type: typeof ComponentEnum.Button;
|
|
37
37
|
style: 1 | 2 | 3 | 4 | 5 | 6;
|
|
38
38
|
custom_id?: string;
|
|
39
39
|
label?: string;
|
|
@@ -51,7 +51,7 @@ export interface APISelectOption {
|
|
|
51
51
|
default?: boolean;
|
|
52
52
|
}
|
|
53
53
|
export interface APIStringSelectComponent {
|
|
54
|
-
type: typeof
|
|
54
|
+
type: typeof ComponentEnum.StringSelect;
|
|
55
55
|
custom_id?: string;
|
|
56
56
|
placeholder?: string;
|
|
57
57
|
min_values?: number;
|
|
@@ -61,7 +61,7 @@ export interface APIStringSelectComponent {
|
|
|
61
61
|
options?: APISelectOption[];
|
|
62
62
|
}
|
|
63
63
|
export interface APIEntitySelectComponent {
|
|
64
|
-
type: typeof
|
|
64
|
+
type: typeof ComponentEnum.UserSelect | typeof ComponentEnum.RoleSelect | typeof ComponentEnum.MentionableSelect | typeof ComponentEnum.ChannelSelect;
|
|
65
65
|
custom_id?: string;
|
|
66
66
|
placeholder?: string;
|
|
67
67
|
min_values?: number;
|
|
@@ -71,8 +71,8 @@ export interface APIEntitySelectComponent {
|
|
|
71
71
|
default_values?: APISelectDefaultValue[];
|
|
72
72
|
}
|
|
73
73
|
export interface APITextInputComponent {
|
|
74
|
-
type: typeof
|
|
75
|
-
style: typeof
|
|
74
|
+
type: typeof ComponentEnum.TextInput;
|
|
75
|
+
style: typeof TextInputType.Short | typeof TextInputType.Paragraph;
|
|
76
76
|
custom_id?: string;
|
|
77
77
|
label?: string;
|
|
78
78
|
placeholder?: string;
|
|
@@ -89,20 +89,20 @@ export interface APIModalComponent {
|
|
|
89
89
|
}
|
|
90
90
|
export type APIActionRowChild = APIButtonComponent | APIStringSelectComponent | APIEntitySelectComponent | APITextInputComponent;
|
|
91
91
|
export interface APIActionRowComponent {
|
|
92
|
-
type: typeof
|
|
92
|
+
type: typeof ComponentEnum.ActionRow;
|
|
93
93
|
components: APIActionRowChild[];
|
|
94
94
|
}
|
|
95
95
|
export interface APISectionComponent {
|
|
96
|
-
type: typeof
|
|
96
|
+
type: typeof ComponentEnum.Section;
|
|
97
97
|
components?: APIComponent[];
|
|
98
98
|
accessory?: APIComponent;
|
|
99
99
|
}
|
|
100
100
|
export interface APITextDisplayComponent {
|
|
101
|
-
type: typeof
|
|
101
|
+
type: typeof ComponentEnum.TextDisplay;
|
|
102
102
|
content: string;
|
|
103
103
|
}
|
|
104
104
|
export interface APIMediaGalleryComponent {
|
|
105
|
-
type: typeof
|
|
105
|
+
type: typeof ComponentEnum.MediaGallery;
|
|
106
106
|
items: {
|
|
107
107
|
media: {
|
|
108
108
|
url: string;
|
|
@@ -116,19 +116,19 @@ export interface APISelectDefaultValue {
|
|
|
116
116
|
type: "user" | "role" | "channel";
|
|
117
117
|
}
|
|
118
118
|
export interface APIFileComponent {
|
|
119
|
-
type: typeof
|
|
119
|
+
type: typeof ComponentEnum.File;
|
|
120
120
|
file: {
|
|
121
121
|
url: string;
|
|
122
122
|
};
|
|
123
123
|
spoiler?: boolean;
|
|
124
124
|
}
|
|
125
125
|
export interface APISeparatorComponent {
|
|
126
|
-
type: typeof
|
|
126
|
+
type: typeof ComponentEnum.Separator;
|
|
127
127
|
spacing?: 1 | 2;
|
|
128
128
|
divider?: boolean;
|
|
129
129
|
}
|
|
130
130
|
export interface APIThumbnailComponent {
|
|
131
|
-
type: typeof
|
|
131
|
+
type: typeof ComponentEnum.Thumbnail;
|
|
132
132
|
url: string;
|
|
133
133
|
proxy_url?: string;
|
|
134
134
|
width?: number;
|
|
@@ -137,17 +137,17 @@ export interface APIThumbnailComponent {
|
|
|
137
137
|
spoiler?: boolean;
|
|
138
138
|
}
|
|
139
139
|
export interface APIContentInventoryEntryComponent {
|
|
140
|
-
type: typeof
|
|
140
|
+
type: typeof ComponentEnum.ContentInventoryEntry;
|
|
141
141
|
id: string;
|
|
142
142
|
}
|
|
143
143
|
export interface APIContainerComponent {
|
|
144
|
-
type: typeof
|
|
144
|
+
type: typeof ComponentEnum.Container;
|
|
145
145
|
components: APIComponent[];
|
|
146
146
|
accent_color?: number;
|
|
147
147
|
spoiler?: boolean;
|
|
148
148
|
}
|
|
149
149
|
export type APIComponent = APIActionRowComponent | APIButtonComponent | APIStringSelectComponent | APIEntitySelectComponent | APITextInputComponent | APISectionComponent | APITextDisplayComponent | APIThumbnailComponent | APIMediaGalleryComponent | APIFileComponent | APISeparatorComponent | APIContentInventoryEntryComponent | APIContainerComponent;
|
|
150
|
-
export declare class
|
|
150
|
+
export declare class CreateActionRow<T extends {
|
|
151
151
|
toJSON(): APIActionRowChild;
|
|
152
152
|
} = {
|
|
153
153
|
toJSON(): APIActionRowChild;
|
|
@@ -157,7 +157,7 @@ export declare class ActionRowBuilder<T extends {
|
|
|
157
157
|
clearComponents(): this;
|
|
158
158
|
toJSON(): APIActionRowComponent;
|
|
159
159
|
}
|
|
160
|
-
export declare class
|
|
160
|
+
export declare class CreateStringSelect {
|
|
161
161
|
#private;
|
|
162
162
|
setCustomId(value: string): this;
|
|
163
163
|
setPlaceholder(value: string): this;
|
|
@@ -168,7 +168,7 @@ export declare class StringSelectBuilder {
|
|
|
168
168
|
addOptions(...options: APISelectOption[]): this;
|
|
169
169
|
toJSON(): APIStringSelectComponent;
|
|
170
170
|
}
|
|
171
|
-
export declare class
|
|
171
|
+
export declare class CreateButton {
|
|
172
172
|
#private;
|
|
173
173
|
/** Sets the style and drops fields that style cannot carry. */
|
|
174
174
|
setStyle(style: APIButtonComponent["style"]): this;
|
|
@@ -181,9 +181,9 @@ export declare class ButtonBuilder {
|
|
|
181
181
|
setDisabled(value?: boolean): this;
|
|
182
182
|
toJSON(): APIButtonComponent;
|
|
183
183
|
}
|
|
184
|
-
export declare class
|
|
184
|
+
export declare class CreateEntitySelect {
|
|
185
185
|
#private;
|
|
186
|
-
constructor(type: typeof
|
|
186
|
+
constructor(type: typeof ComponentEnum.UserSelect | typeof ComponentEnum.RoleSelect | typeof ComponentEnum.MentionableSelect | typeof ComponentEnum.ChannelSelect);
|
|
187
187
|
setCustomId(value: string): this;
|
|
188
188
|
setPlaceholder(value: string): this;
|
|
189
189
|
setMinValues(value: number): this;
|
|
@@ -193,7 +193,7 @@ export declare class EntitySelectBuilder {
|
|
|
193
193
|
setDefaultValues(...values: APISelectDefaultValue[]): this;
|
|
194
194
|
toJSON(): APIEntitySelectComponent;
|
|
195
195
|
}
|
|
196
|
-
export declare class
|
|
196
|
+
export declare class CreateModal {
|
|
197
197
|
#private;
|
|
198
198
|
setCustomId(value: string): this;
|
|
199
199
|
setTitle(value: string): this;
|
|
@@ -201,10 +201,10 @@ export declare class ModalBuilder {
|
|
|
201
201
|
toJSON(): APIActionRowComponent;
|
|
202
202
|
}>): this;
|
|
203
203
|
/** Adds text inputs, each in its own action row (Discord's modal layout). @param inputs Text inputs, at most 5 per modal. */
|
|
204
|
-
addTextInputs(...inputs:
|
|
204
|
+
addTextInputs(...inputs: CreateTextInput[]): this;
|
|
205
205
|
toJSON(): APIModalComponent;
|
|
206
206
|
}
|
|
207
|
-
export declare class
|
|
207
|
+
export declare class CreateTextInput {
|
|
208
208
|
#private;
|
|
209
209
|
setStyle(style: APITextInputComponent["style"]): this;
|
|
210
210
|
setCustomId(value: string): this;
|
|
@@ -216,7 +216,7 @@ export declare class TextInputBuilder {
|
|
|
216
216
|
setValue(value: string): this;
|
|
217
217
|
toJSON(): APITextInputComponent;
|
|
218
218
|
}
|
|
219
|
-
export declare class
|
|
219
|
+
export declare class CreateContainer {
|
|
220
220
|
#private;
|
|
221
221
|
addComponents(...components: {
|
|
222
222
|
toJSON(): APIComponent;
|
|
@@ -226,7 +226,7 @@ export declare class ContainerBuilder {
|
|
|
226
226
|
setSpoiler(spoiler?: boolean): this;
|
|
227
227
|
toJSON(): APIContainerComponent;
|
|
228
228
|
}
|
|
229
|
-
export declare class
|
|
229
|
+
export declare class CreateSection {
|
|
230
230
|
#private;
|
|
231
231
|
addComponents(...components: {
|
|
232
232
|
toJSON(): APIComponent;
|
|
@@ -236,12 +236,12 @@ export declare class SectionBuilder {
|
|
|
236
236
|
}): this;
|
|
237
237
|
toJSON(): APISectionComponent;
|
|
238
238
|
}
|
|
239
|
-
export declare class
|
|
239
|
+
export declare class CreateTextDisplay {
|
|
240
240
|
#private;
|
|
241
241
|
setContent(content: string): this;
|
|
242
242
|
toJSON(): APITextDisplayComponent;
|
|
243
243
|
}
|
|
244
|
-
export declare class
|
|
244
|
+
export declare class CreateMediaGallery {
|
|
245
245
|
#private;
|
|
246
246
|
addItems(...items: {
|
|
247
247
|
url: string;
|
|
@@ -249,19 +249,19 @@ export declare class MediaGalleryBuilder {
|
|
|
249
249
|
}[]): this;
|
|
250
250
|
toJSON(): APIMediaGalleryComponent;
|
|
251
251
|
}
|
|
252
|
-
export declare class
|
|
252
|
+
export declare class CreateFileComponent {
|
|
253
253
|
#private;
|
|
254
254
|
setUrl(url: string): this;
|
|
255
255
|
setSpoiler(spoiler?: boolean): this;
|
|
256
256
|
toJSON(): APIFileComponent;
|
|
257
257
|
}
|
|
258
|
-
export declare class
|
|
258
|
+
export declare class CreateSeparator {
|
|
259
259
|
#private;
|
|
260
260
|
setSpacing(spacing: 1 | 2): this;
|
|
261
261
|
setDivider(divider?: boolean): this;
|
|
262
262
|
toJSON(): APISeparatorComponent;
|
|
263
263
|
}
|
|
264
|
-
export declare class
|
|
264
|
+
export declare class CreateThumbnail {
|
|
265
265
|
#private;
|
|
266
266
|
setUrl(url: string): this;
|
|
267
267
|
/** Sets the thumbnail's alt-text description. */
|
|
@@ -270,27 +270,27 @@ export declare class ThumbnailBuilder {
|
|
|
270
270
|
setSpoiler(spoiler?: boolean): this;
|
|
271
271
|
toJSON(): APIThumbnailComponent;
|
|
272
272
|
}
|
|
273
|
-
export declare class
|
|
273
|
+
export declare class CreateContentInventoryEntry {
|
|
274
274
|
#private;
|
|
275
275
|
setId(id: string): this;
|
|
276
276
|
toJSON(): APIContentInventoryEntryComponent;
|
|
277
277
|
}
|
|
278
|
-
/** Discord.js-familiar alias for {@link
|
|
279
|
-
export {
|
|
278
|
+
/** Discord.js-familiar alias for {@link CreateStringSelect}. */
|
|
279
|
+
export { CreateStringSelect as CreateStringSelectMenu };
|
|
280
280
|
/** User select menu builder (Discord.js-familiar). */
|
|
281
|
-
export declare class
|
|
281
|
+
export declare class CreateUserSelectMenu extends CreateEntitySelect {
|
|
282
282
|
constructor();
|
|
283
283
|
}
|
|
284
284
|
/** Role select menu builder (Discord.js-familiar). */
|
|
285
|
-
export declare class
|
|
285
|
+
export declare class CreateRoleSelectMenu extends CreateEntitySelect {
|
|
286
286
|
constructor();
|
|
287
287
|
}
|
|
288
288
|
/** Mentionable select menu builder (Discord.js-familiar). */
|
|
289
|
-
export declare class
|
|
289
|
+
export declare class CreateMentionableSelectMenu extends CreateEntitySelect {
|
|
290
290
|
constructor();
|
|
291
291
|
}
|
|
292
292
|
/** Channel select menu builder (Discord.js-familiar). */
|
|
293
|
-
export declare class
|
|
293
|
+
export declare class CreateChannelSelectMenu extends CreateEntitySelect {
|
|
294
294
|
constructor();
|
|
295
295
|
}
|
|
296
296
|
/**
|
|
@@ -298,7 +298,7 @@ export declare class ChannelSelectMenuBuilder extends EntitySelectBuilder {
|
|
|
298
298
|
* Discord requires for them. A V2 message cannot also carry `content` or `embeds`.
|
|
299
299
|
* @param components Top-level components (containers, sections, text displays, action rows...).
|
|
300
300
|
* @param options Extra message fields, such as `allowed_mentions` or `ephemeral`; `flags` are combined.
|
|
301
|
-
* @example channel.send(componentsV2Message(new
|
|
301
|
+
* @example channel.send(componentsV2Message(new CreateContainer().addComponents(new CreateTextDisplay().setContent("Hi"))))
|
|
302
302
|
*/
|
|
303
303
|
export declare function componentsV2Message<T extends Record<string, unknown> = Record<string, never>>(components: {
|
|
304
304
|
toJSON(): APIComponent;
|
|
@@ -310,3 +310,122 @@ export declare function componentsV2Message<T extends Record<string, unknown> =
|
|
|
310
310
|
components: APIComponent[];
|
|
311
311
|
flags: number;
|
|
312
312
|
} & T;
|
|
313
|
+
/** @deprecated Use {@link CreateButton}. Removed in 2.0. */
|
|
314
|
+
export declare const ButtonBuilder: typeof CreateButton;
|
|
315
|
+
/** @deprecated Use {@link CreateButton}. Removed in 2.0. */
|
|
316
|
+
export type ButtonBuilder = CreateButton;
|
|
317
|
+
/** @deprecated Use {@link CreateChannelSelectMenu}. Removed in 2.0. */
|
|
318
|
+
export declare const ChannelSelectMenuBuilder: typeof CreateChannelSelectMenu;
|
|
319
|
+
/** @deprecated Use {@link CreateChannelSelectMenu}. Removed in 2.0. */
|
|
320
|
+
export type ChannelSelectMenuBuilder = CreateChannelSelectMenu;
|
|
321
|
+
/** @deprecated Use {@link CreateContainer}. Removed in 2.0. */
|
|
322
|
+
export declare const ContainerBuilder: typeof CreateContainer;
|
|
323
|
+
/** @deprecated Use {@link CreateContainer}. Removed in 2.0. */
|
|
324
|
+
export type ContainerBuilder = CreateContainer;
|
|
325
|
+
/** @deprecated Use {@link CreateContentInventoryEntry}. Removed in 2.0. */
|
|
326
|
+
export declare const ContentInventoryEntryBuilder: typeof CreateContentInventoryEntry;
|
|
327
|
+
/** @deprecated Use {@link CreateContentInventoryEntry}. Removed in 2.0. */
|
|
328
|
+
export type ContentInventoryEntryBuilder = CreateContentInventoryEntry;
|
|
329
|
+
/** @deprecated Use {@link CreateEntitySelect}. Removed in 2.0. */
|
|
330
|
+
export declare const EntitySelectBuilder: typeof CreateEntitySelect;
|
|
331
|
+
/** @deprecated Use {@link CreateEntitySelect}. Removed in 2.0. */
|
|
332
|
+
export type EntitySelectBuilder = CreateEntitySelect;
|
|
333
|
+
/** @deprecated Use {@link CreateFileComponent}. Removed in 2.0. */
|
|
334
|
+
export declare const FileComponentBuilder: typeof CreateFileComponent;
|
|
335
|
+
/** @deprecated Use {@link CreateFileComponent}. Removed in 2.0. */
|
|
336
|
+
export type FileComponentBuilder = CreateFileComponent;
|
|
337
|
+
/** @deprecated Use {@link CreateMediaGallery}. Removed in 2.0. */
|
|
338
|
+
export declare const MediaGalleryBuilder: typeof CreateMediaGallery;
|
|
339
|
+
/** @deprecated Use {@link CreateMediaGallery}. Removed in 2.0. */
|
|
340
|
+
export type MediaGalleryBuilder = CreateMediaGallery;
|
|
341
|
+
/** @deprecated Use {@link CreateMentionableSelectMenu}. Removed in 2.0. */
|
|
342
|
+
export declare const MentionableSelectMenuBuilder: typeof CreateMentionableSelectMenu;
|
|
343
|
+
/** @deprecated Use {@link CreateMentionableSelectMenu}. Removed in 2.0. */
|
|
344
|
+
export type MentionableSelectMenuBuilder = CreateMentionableSelectMenu;
|
|
345
|
+
/** @deprecated Use {@link CreateModal}. Removed in 2.0. */
|
|
346
|
+
export declare const ModalBuilder: typeof CreateModal;
|
|
347
|
+
/** @deprecated Use {@link CreateModal}. Removed in 2.0. */
|
|
348
|
+
export type ModalBuilder = CreateModal;
|
|
349
|
+
/** @deprecated Use {@link CreateRoleSelectMenu}. Removed in 2.0. */
|
|
350
|
+
export declare const RoleSelectMenuBuilder: typeof CreateRoleSelectMenu;
|
|
351
|
+
/** @deprecated Use {@link CreateRoleSelectMenu}. Removed in 2.0. */
|
|
352
|
+
export type RoleSelectMenuBuilder = CreateRoleSelectMenu;
|
|
353
|
+
/** @deprecated Use {@link CreateSection}. Removed in 2.0. */
|
|
354
|
+
export declare const SectionBuilder: typeof CreateSection;
|
|
355
|
+
/** @deprecated Use {@link CreateSection}. Removed in 2.0. */
|
|
356
|
+
export type SectionBuilder = CreateSection;
|
|
357
|
+
/** @deprecated Use {@link CreateSeparator}. Removed in 2.0. */
|
|
358
|
+
export declare const SeparatorBuilder: typeof CreateSeparator;
|
|
359
|
+
/** @deprecated Use {@link CreateSeparator}. Removed in 2.0. */
|
|
360
|
+
export type SeparatorBuilder = CreateSeparator;
|
|
361
|
+
/** @deprecated Use {@link CreateStringSelect}. Removed in 2.0. */
|
|
362
|
+
export declare const StringSelectBuilder: typeof CreateStringSelect;
|
|
363
|
+
/** @deprecated Use {@link CreateStringSelect}. Removed in 2.0. */
|
|
364
|
+
export type StringSelectBuilder = CreateStringSelect;
|
|
365
|
+
/** @deprecated Use {@link CreateStringSelectMenu}. Removed in 2.0. */
|
|
366
|
+
export declare const StringSelectMenuBuilder: typeof CreateStringSelect;
|
|
367
|
+
/** @deprecated Use {@link CreateStringSelectMenu}. Removed in 2.0. */
|
|
368
|
+
export type StringSelectMenuBuilder = CreateStringSelect;
|
|
369
|
+
/** @deprecated Use {@link CreateTextDisplay}. Removed in 2.0. */
|
|
370
|
+
export declare const TextDisplayBuilder: typeof CreateTextDisplay;
|
|
371
|
+
/** @deprecated Use {@link CreateTextDisplay}. Removed in 2.0. */
|
|
372
|
+
export type TextDisplayBuilder = CreateTextDisplay;
|
|
373
|
+
/** @deprecated Use {@link CreateTextInput}. Removed in 2.0. */
|
|
374
|
+
export declare const TextInputBuilder: typeof CreateTextInput;
|
|
375
|
+
/** @deprecated Use {@link CreateTextInput}. Removed in 2.0. */
|
|
376
|
+
export type TextInputBuilder = CreateTextInput;
|
|
377
|
+
/** @deprecated Use {@link CreateThumbnail}. Removed in 2.0. */
|
|
378
|
+
export declare const ThumbnailBuilder: typeof CreateThumbnail;
|
|
379
|
+
/** @deprecated Use {@link CreateThumbnail}. Removed in 2.0. */
|
|
380
|
+
export type ThumbnailBuilder = CreateThumbnail;
|
|
381
|
+
/** @deprecated Use {@link CreateUserSelectMenu}. Removed in 2.0. */
|
|
382
|
+
export declare const UserSelectMenuBuilder: typeof CreateUserSelectMenu;
|
|
383
|
+
/** @deprecated Use {@link CreateUserSelectMenu}. Removed in 2.0. */
|
|
384
|
+
export type UserSelectMenuBuilder = CreateUserSelectMenu;
|
|
385
|
+
/** @deprecated Use {@link CreateActionRow}. Removed in 2.0. */
|
|
386
|
+
export declare const ActionRowBuilder: typeof CreateActionRow;
|
|
387
|
+
/** @deprecated Use {@link CreateActionRow}. Removed in 2.0. */
|
|
388
|
+
export type ActionRowBuilder<T extends {
|
|
389
|
+
toJSON(): APIActionRowChild;
|
|
390
|
+
} = {
|
|
391
|
+
toJSON(): APIActionRowChild;
|
|
392
|
+
}> = CreateActionRow<T>;
|
|
393
|
+
/** @deprecated Use {@link ButtonType}. Removed in 2.0. */
|
|
394
|
+
export declare const ButtonStyle: {
|
|
395
|
+
readonly Primary: 1;
|
|
396
|
+
readonly Secondary: 2;
|
|
397
|
+
readonly Success: 3;
|
|
398
|
+
readonly Danger: 4;
|
|
399
|
+
readonly Link: 5;
|
|
400
|
+
readonly Premium: 6;
|
|
401
|
+
};
|
|
402
|
+
/** @deprecated Use {@link ButtonType}. Removed in 2.0. */
|
|
403
|
+
export type ButtonStyle = ButtonType;
|
|
404
|
+
/** @deprecated Use {@link TextInputType}. Removed in 2.0. */
|
|
405
|
+
export declare const TextInputStyle: {
|
|
406
|
+
readonly Short: 1;
|
|
407
|
+
readonly Paragraph: 2;
|
|
408
|
+
};
|
|
409
|
+
/** @deprecated Use {@link TextInputType}. Removed in 2.0. */
|
|
410
|
+
export type TextInputStyle = TextInputType;
|
|
411
|
+
/** @deprecated Use {@link ComponentEnum}. Removed in 2.0. */
|
|
412
|
+
export declare const ComponentType: {
|
|
413
|
+
readonly ActionRow: 1;
|
|
414
|
+
readonly Button: 2;
|
|
415
|
+
readonly StringSelect: 3;
|
|
416
|
+
readonly TextInput: 4;
|
|
417
|
+
readonly UserSelect: 5;
|
|
418
|
+
readonly RoleSelect: 6;
|
|
419
|
+
readonly MentionableSelect: 7;
|
|
420
|
+
readonly ChannelSelect: 8;
|
|
421
|
+
readonly Section: 9;
|
|
422
|
+
readonly TextDisplay: 10;
|
|
423
|
+
readonly Thumbnail: 11;
|
|
424
|
+
readonly MediaGallery: 12;
|
|
425
|
+
readonly File: 13;
|
|
426
|
+
readonly Separator: 14;
|
|
427
|
+
readonly ContentInventoryEntry: 16;
|
|
428
|
+
readonly Container: 17;
|
|
429
|
+
};
|
|
430
|
+
/** @deprecated Use {@link ComponentEnum}. Removed in 2.0. */
|
|
431
|
+
export type ComponentType = ComponentEnum;
|
package/dist/builders/embed.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface APIEmbed {
|
|
|
33
33
|
/** Embed fields. */ fields?: EmbedField[];
|
|
34
34
|
}
|
|
35
35
|
/** Builds compile-time-safe rich embed payloads for Discord API requests. */
|
|
36
|
-
export declare class
|
|
36
|
+
export declare class CreateEmbed {
|
|
37
37
|
#private;
|
|
38
38
|
/** Sets the embed title. @param value Title text, or null to clear. @returns This builder. @throws {RangeError} If title exceeds Discord's limit. */ setTitle(value: string | null): this;
|
|
39
39
|
/** Sets the embed description. @param value Description text, or null to clear. @returns This builder. @throws {RangeError} If description exceeds Discord's limit. */ setDescription(value: string | null): this;
|
|
@@ -59,3 +59,7 @@ export declare class EmbedBuilder {
|
|
|
59
59
|
/** Returns a deep-cloned Discord API payload. @returns Strict embed payload. */ get data(): APIEmbed;
|
|
60
60
|
toJSON(): APIEmbed;
|
|
61
61
|
}
|
|
62
|
+
/** @deprecated Use {@link CreateEmbed}. Removed in 2.0. */
|
|
63
|
+
export declare const EmbedBuilder: typeof CreateEmbed;
|
|
64
|
+
/** @deprecated Use {@link CreateEmbed}. Removed in 2.0. */
|
|
65
|
+
export type EmbedBuilder = CreateEmbed;
|
package/dist/builders/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { CreateEmbed } from "./embed.js";
|
|
2
2
|
export type { EmbedField } from "./embed.js";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
3
|
+
export { CreateButton, ButtonType, ComponentEnum, CreateActionRow, CreateStringSelect, CreateStringSelectMenu, CreateEntitySelect, CreateUserSelectMenu, CreateRoleSelectMenu, CreateMentionableSelectMenu, CreateChannelSelectMenu, CreateModal, CreateTextInput, TextInputType, CreateContainer, CreateSection, CreateTextDisplay, CreateMediaGallery, CreateFileComponent, CreateSeparator, CreateThumbnail, CreateContentInventoryEntry, componentsV2Message, } from "./components.js";
|
|
4
|
+
export { CreateSlashCommand, CreateStringOption, CreateIntegerOption, CreateNumberOption, CreateBooleanOption, CreateUserOption, CreateChannelOption, CreateRoleOption, CreateMentionableOption, CreateAttachmentOption, CreateSubcommand, CreateSubcommandGroup, ApplicationCommandOptionEnum, CreateUserCommand, CreateMessageCommand, CreateContextMenuCommand, } from "./commands.js";
|
|
5
|
+
export { CreateAttachment, type AttachmentData } from "./attachment.js";
|
|
6
|
+
export { AttachmentBuilder } from "./attachment.js";
|
|
7
|
+
export { EmbedBuilder } from "./embed.js";
|
|
8
|
+
export { AttachmentOptionBuilder, BooleanOptionBuilder, ChannelOptionBuilder, CommandOptionBuilder, ContextMenuCommandBuilder, IntegerOptionBuilder, MentionableOptionBuilder, MessageCommandBuilder, NumberOptionBuilder, RoleOptionBuilder, SlashCommandBuilder, StringOptionBuilder, SubcommandBuilder, SubcommandGroupBuilder, UserCommandBuilder, UserOptionBuilder, ApplicationCommandOptionType, } from "./commands.js";
|
|
9
|
+
export { ButtonBuilder, ChannelSelectMenuBuilder, ContainerBuilder, ContentInventoryEntryBuilder, EntitySelectBuilder, FileComponentBuilder, MediaGalleryBuilder, MentionableSelectMenuBuilder, ModalBuilder, RoleSelectMenuBuilder, SectionBuilder, SeparatorBuilder, StringSelectBuilder, StringSelectMenuBuilder, TextDisplayBuilder, TextInputBuilder, ThumbnailBuilder, UserSelectMenuBuilder, ActionRowBuilder, ButtonStyle, TextInputStyle, ComponentType, } from "./components.js";
|
|
10
|
+
export type { APIComponent, APIComponentEmoji, APIActionRowChild, APIActionRowComponent, APIButtonComponent, APISelectOption, APISelectDefaultValue, APIStringSelectComponent, APIEntitySelectComponent, APITextInputComponent, APIModalComponent, APIContainerComponent, APISectionComponent, APITextDisplayComponent, APIMediaGalleryComponent, APIFileComponent, APISeparatorComponent, APIThumbnailComponent, APIContentInventoryEntryComponent, } from "./components.js";
|