disgroove 2.2.7-dev.fca4921 → 2.2.7

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.
Files changed (35) hide show
  1. package/dist/lib/Client.d.ts +49 -13
  2. package/dist/lib/Client.js +99 -6
  3. package/dist/lib/constants.d.ts +29 -21
  4. package/dist/lib/constants.js +33 -24
  5. package/dist/lib/gateway/Shard.js +15 -0
  6. package/dist/lib/index.d.ts +1 -1
  7. package/dist/lib/index.js +1 -1
  8. package/dist/lib/rest/Endpoints.d.ts +4 -0
  9. package/dist/lib/rest/Endpoints.js +10 -1
  10. package/dist/lib/rest/RequestManager.d.ts +1 -3
  11. package/dist/lib/transformers/Components.d.ts +13 -3
  12. package/dist/lib/transformers/Components.js +277 -150
  13. package/dist/lib/transformers/Interactions.js +283 -38
  14. package/dist/lib/transformers/Lobbies.d.ts +7 -0
  15. package/dist/lib/transformers/Lobbies.js +38 -0
  16. package/dist/lib/transformers/Messages.d.ts +4 -3
  17. package/dist/lib/transformers/Messages.js +20 -34
  18. package/dist/lib/transformers/Roles.js +2 -2
  19. package/dist/lib/transformers/index.d.ts +2 -1
  20. package/dist/lib/transformers/index.js +2 -1
  21. package/dist/lib/types/components.d.ts +450 -0
  22. package/dist/lib/types/components.js +2 -0
  23. package/dist/lib/types/gateway-events.d.ts +23 -1
  24. package/dist/lib/types/guild.d.ts +7 -5
  25. package/dist/lib/types/interaction.d.ts +12 -8
  26. package/dist/lib/types/invite.d.ts +2 -2
  27. package/dist/lib/types/lobby.d.ts +29 -0
  28. package/dist/lib/types/lobby.js +2 -0
  29. package/dist/lib/types/message-components.d.ts +334 -118
  30. package/dist/lib/types/message.d.ts +3 -5
  31. package/dist/lib/types/role.d.ts +2 -2
  32. package/dist/lib/utils/formatters.d.ts +1 -1
  33. package/dist/lib/utils/formatters.js +1 -1
  34. package/dist/package.json +4 -4
  35. package/package.json +4 -4
@@ -1,81 +1,165 @@
1
1
  import type { ButtonStyles, ChannelTypes, ComponentTypes, SeparatorSpacing, TextInputStyles } from "../constants";
2
2
  import type { snowflake } from "./common";
3
3
  import type { RawEmoji, Emoji } from "./emoji";
4
+ import type { RawResolvedData, ResolvedData } from "./interaction";
5
+ /** https://discord.com/developers/docs/components/reference#action-row-action-row-structure */
6
+ export interface RawActionRow {
7
+ type: ComponentTypes.ActionRow;
8
+ components: Array<RawButton | RawStringSelect | RawTextInput | RawUserSelect | RawRoleSelect | RawMentionableSelect | RawChannelSelect>;
9
+ id?: number;
10
+ }
4
11
  /** https://discord.com/developers/docs/components/reference#button-button-structure */
5
12
  export interface RawButton {
6
13
  type: ComponentTypes.Button;
14
+ id?: number;
7
15
  style: ButtonStyles;
8
16
  label?: string;
9
17
  emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
10
- custom_id?: string;
18
+ custom_id: string;
11
19
  sku_id?: snowflake;
12
20
  url?: string;
13
21
  disabled?: boolean;
22
+ }
23
+ /** https://discord.com/developers/docs/components/reference#string-select-string-select-structure */
24
+ export interface RawStringSelect {
25
+ type: ComponentTypes.StringSelect;
14
26
  id?: number;
27
+ custom_id: string;
28
+ options: Array<RawSelectOption>;
29
+ placeholder?: string;
30
+ min_values?: number;
31
+ max_values?: number;
32
+ required?: boolean;
33
+ disabled?: boolean;
15
34
  }
16
- /** https://discord.com/developers/docs/components/reference#container-container-structure */
17
- export interface RawContainer {
18
- type: ComponentTypes.Container;
35
+ /** https://discord.com/developers/docs/components/reference#string-select-string-select-interaction-response-structure */
36
+ export interface RawStringSelectInteractionResponse {
37
+ type: ComponentTypes.StringSelect;
38
+ component_type: ComponentTypes.StringSelect;
39
+ id: number;
40
+ custom_id: string;
41
+ values: Array<string>;
42
+ }
43
+ /** https://discord.com/developers/docs/components/reference#string-select-select-option-structure */
44
+ export interface RawSelectOption {
45
+ label: string;
46
+ value: string;
47
+ description?: string;
48
+ emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
49
+ default?: boolean;
50
+ }
51
+ /** https://discord.com/developers/docs/components/reference#text-input-text-input-structure */
52
+ export interface RawTextInput {
53
+ type: ComponentTypes.TextInput;
19
54
  id?: number;
20
- components: Array<RawActionRow | RawTextDisplay | RawSection | RawMediaGallery | RawSeparator | RawFile>;
21
- accent_color?: number | null;
22
- spoiler?: boolean;
55
+ custom_id: string;
56
+ style: TextInputStyles;
57
+ min_length?: number;
58
+ max_length?: number;
59
+ required?: boolean;
60
+ value?: string;
61
+ placeholder?: string;
62
+ label: string;
23
63
  }
24
- /** https://discord.com/developers/docs/components/reference#file-file-structure */
25
- export interface RawFile {
26
- type: ComponentTypes.File;
64
+ /** https://discord.com/developers/docs/components/reference#text-input-text-input-interaction-response-structure */
65
+ export interface RawTextInputInteractionResponse {
66
+ type: ComponentTypes.TextInput;
67
+ id: number;
68
+ custom_id: string;
69
+ value: string;
70
+ }
71
+ /** https://discord.com/developers/docs/components/reference#user-select-user-select-structure */
72
+ export interface RawUserSelect {
73
+ type: ComponentTypes.UserSelect;
27
74
  id?: number;
28
- file: RawUnfurledMediaItem;
29
- spoiler?: boolean;
30
- name: string;
31
- size: number;
75
+ custom_id: string;
76
+ placeholder?: string;
77
+ default_values?: Array<RawDefaultValue>;
78
+ min_values?: number;
79
+ max_values?: number;
80
+ disabled?: boolean;
32
81
  }
33
- /** https://discord.com/developers/docs/components/reference#media-gallery-media-gallery-structure */
34
- export interface RawMediaGallery {
35
- type: ComponentTypes.MediaGallery;
82
+ /** https://discord.com/developers/docs/components/reference#user-select-user-select-interaction-response-structure */
83
+ export interface RawUserSelectInteractionResponse {
84
+ type: ComponentTypes.UserSelect;
85
+ component_type: ComponentTypes.UserSelect;
86
+ id: number;
87
+ custom_id: string;
88
+ resolved: RawResolvedData;
89
+ values: Array<snowflake>;
90
+ }
91
+ /** https://discord.com/developers/docs/components/reference#user-select-select-default-value-structure */
92
+ export interface RawDefaultValue {
93
+ id: snowflake;
94
+ type: "user" | "role" | "channel";
95
+ }
96
+ /** https://discord.com/developers/docs/components/reference#role-select-role-select-structure */
97
+ export interface RawRoleSelect {
98
+ type: ComponentTypes.RoleSelect;
36
99
  id?: number;
37
- items: Array<RawMediaGalleryItem>;
100
+ custom_id: string;
101
+ placeholder?: string;
102
+ default_values?: Array<RawDefaultValue>;
103
+ min_values?: number;
104
+ max_values?: number;
105
+ disabled?: boolean;
38
106
  }
39
- /** https://discord.com/developers/docs/components/reference#media-gallery-media-gallery-item-structure */
40
- export interface RawMediaGalleryItem {
41
- media: RawUnfurledMediaItem;
42
- description?: string;
43
- spoiler?: boolean;
107
+ /** https://discord.com/developers/docs/components/reference#role-select-role-select-interaction-response-structure */
108
+ export interface RawRoleSelectInteractionResponse {
109
+ type: ComponentTypes.RoleSelect;
110
+ component_type: ComponentTypes.RoleSelect;
111
+ id: number;
112
+ custom_id: string;
113
+ resolved: RawResolvedData;
114
+ values: Array<snowflake>;
44
115
  }
45
- /** https://discord.com/developers/docs/components/reference#section-section-structure */
46
- export interface RawSection {
47
- type: ComponentTypes.Section;
116
+ /** https://discord.com/developers/docs/components/reference#mentionable-select-mentionable-select-structure */
117
+ export interface RawMentionableSelect {
118
+ type: ComponentTypes.MentionableSelect;
48
119
  id?: number;
49
- components: Array<RawTextDisplay>;
50
- accessory: RawThumbnail | RawButton;
120
+ custom_id: string;
121
+ placeholder?: string;
122
+ default_values?: Array<RawDefaultValue>;
123
+ min_values?: number;
124
+ max_values?: number;
125
+ disabled?: boolean;
51
126
  }
52
- /** https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-menu-structure */
53
- export interface RawSelectMenu {
54
- type: ComponentTypes.ChannelSelect | ComponentTypes.MentionableSelect | ComponentTypes.RoleSelect | ComponentTypes.StringSelect | ComponentTypes.UserSelect;
127
+ /** https://discord.com/developers/docs/components/reference#mentionable-select-mentionable-select-interaction-response-structure */
128
+ export interface RawMentionableSelectInteractionResponse {
129
+ type: ComponentTypes.MentionableSelect;
130
+ component_type: ComponentTypes.MentionableSelect;
131
+ id: number;
132
+ custom_id: string;
133
+ resolved: RawResolvedData;
134
+ values: Array<snowflake>;
135
+ }
136
+ /** https://discord.com/developers/docs/components/reference#channel-select-channel-select-structure */
137
+ export interface RawChannelSelect {
138
+ type: ComponentTypes.ChannelSelect;
139
+ id?: number;
55
140
  custom_id: string;
56
- options?: Array<RawSelectOption>;
57
141
  channel_types?: Array<ChannelTypes>;
58
142
  placeholder?: string;
59
143
  default_values?: Array<RawDefaultValue>;
60
144
  min_values?: number;
61
145
  max_values?: number;
62
146
  disabled?: boolean;
63
- id?: number;
64
147
  }
65
- /** https://discord.com/developers/docs/components/reference#string-select-select-option-structure */
66
- export interface RawSelectOption {
67
- label: string;
68
- value: string;
69
- description?: string;
70
- emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
71
- default?: boolean;
148
+ /** https://discord.com/developers/docs/components/reference#channel-select-channel-select-interaction-response-structure */
149
+ export interface RawChannelSelectInteractionResponse {
150
+ type: ComponentTypes.ChannelSelect;
151
+ component_type: ComponentTypes.ChannelSelect;
152
+ id: number;
153
+ custom_id: string;
154
+ resolved: RawResolvedData;
155
+ values: Array<snowflake>;
72
156
  }
73
- /** https://discord.com/developers/docs/components/reference#separator-separator-structure */
74
- export interface RawSeparator {
75
- type: ComponentTypes.Separator;
157
+ /** https://discord.com/developers/docs/components/reference#section-section-structure */
158
+ export interface RawSection {
159
+ type: ComponentTypes.Section;
76
160
  id?: number;
77
- divider?: boolean;
78
- spacing?: SeparatorSpacing;
161
+ components: Array<RawTextDisplay>;
162
+ accessory: RawButton | RawThumbnail;
79
163
  }
80
164
  /** https://discord.com/developers/docs/components/reference#text-display-text-display-structure */
81
165
  export interface RawTextDisplay {
@@ -83,6 +167,11 @@ export interface RawTextDisplay {
83
167
  id?: number;
84
168
  content: string;
85
169
  }
170
+ /** https://discord.com/developers/docs/components/reference#text-display-text-display-interaction-response-structure */
171
+ export interface RawTextDisplayInteractionResponse {
172
+ type: ComponentTypes.TextDisplay;
173
+ id: number;
174
+ }
86
175
  /** https://discord.com/developers/docs/components/reference#thumbnail-thumbnail-structure */
87
176
  export interface RawThumbnail {
88
177
  type: ComponentTypes.Thumbnail;
@@ -91,31 +180,57 @@ export interface RawThumbnail {
91
180
  description?: string;
92
181
  spoiler?: boolean;
93
182
  }
94
- /** https://discord.com/developers/docs/components/reference#user-select-select-default-value-structure */
95
- export interface RawDefaultValue {
96
- id: snowflake;
97
- type: string;
183
+ /** https://discord.com/developers/docs/components/reference#media-gallery-media-gallery-structure */
184
+ export interface RawMediaGallery {
185
+ type: ComponentTypes.MediaGallery;
186
+ id?: number;
187
+ items: Array<RawMediaGalleryItem>;
98
188
  }
99
- /** https://discord.com/developers/docs/components/reference#text-input-text-input-structure */
100
- export interface RawTextInput {
101
- type: ComponentTypes.TextInput;
102
- custom_id: string;
103
- style: TextInputStyles;
104
- label: string;
105
- min_length?: number;
106
- max_length?: number;
107
- required?: boolean;
108
- value?: string;
109
- placeholder?: string;
189
+ /** https://discord.com/developers/docs/components/reference#media-gallery-media-gallery-item-structure */
190
+ export interface RawMediaGalleryItem {
191
+ media: RawUnfurledMediaItem;
192
+ description?: string;
193
+ spoiler?: boolean;
194
+ }
195
+ /** https://discord.com/developers/docs/components/reference#file-file-structure */
196
+ export interface RawFile {
197
+ type: ComponentTypes.File;
110
198
  id?: number;
199
+ file: RawUnfurledMediaItem;
200
+ spoiler?: boolean;
201
+ name: string;
202
+ size: number;
111
203
  }
112
- /** https://discord.com/developers/docs/components/reference#action-row-action-row-structure */
113
- export interface RawActionRow {
114
- type: ComponentTypes.ActionRow;
115
- components: Array<RawButton | RawSelectMenu | RawTextInput>;
204
+ /** https://discord.com/developers/docs/components/reference#separator-separator-structure */
205
+ export interface RawSeparator {
206
+ type: ComponentTypes.Separator;
207
+ id?: number;
208
+ divider?: boolean;
209
+ spacing?: SeparatorSpacing;
210
+ }
211
+ /** https://discord.com/developers/docs/components/reference#container-container-structure */
212
+ export interface RawContainer {
213
+ type: ComponentTypes.Container;
214
+ id?: number;
215
+ components: Array<RawActionRow | RawTextDisplay | RawSection | RawMediaGallery | RawSeparator | RawFile>;
216
+ accent_color?: number | null;
217
+ spoiler?: boolean;
218
+ }
219
+ /** https://discord.com/developers/docs/components/reference#label-label-structure */
220
+ export interface RawLabel {
221
+ type: ComponentTypes.Label;
116
222
  id?: number;
223
+ label: string;
224
+ description?: string;
225
+ component: RawTextInput | RawStringSelect | RawUserSelect | RawRoleSelect | RawMentionableSelect | RawChannelSelect;
226
+ }
227
+ /** https://discord.com/developers/docs/components/reference#label-label-interaction-response-structure */
228
+ export interface RawLabelInteractionResponse {
229
+ type: ComponentTypes.Label;
230
+ id: number;
231
+ component: RawTextInputInteractionResponse | RawStringSelectInteractionResponse | RawUserSelectInteractionResponse | RawRoleSelectInteractionResponse | RawMentionableSelectInteractionResponse | RawChannelSelectInteractionResponse;
117
232
  }
118
- /** https://discord.com/developers/docs/components/reference#unfurled-media-item-structure */
233
+ /** https://discord.com/developers/docs/components/reference#unfurled-media-item-unfurled-media-item-structure */
119
234
  export interface RawUnfurledMediaItem {
120
235
  url: string;
121
236
  proxy_url?: string;
@@ -124,78 +239,157 @@ export interface RawUnfurledMediaItem {
124
239
  content_type?: string;
125
240
  attachment_id?: snowflake;
126
241
  }
242
+ export interface ActionRow {
243
+ type: ComponentTypes.ActionRow;
244
+ components: Array<Button | StringSelect | TextInput | UserSelect | RoleSelect | MentionableSelect | ChannelSelect>;
245
+ id?: number;
246
+ }
127
247
  export interface Button {
128
248
  type: ComponentTypes.Button;
249
+ id?: number;
129
250
  style: ButtonStyles;
130
251
  label?: string;
131
252
  emoji?: Pick<Emoji, "name" | "id" | "animated">;
132
- customID?: string;
253
+ customID: string;
133
254
  skuID?: snowflake;
134
255
  url?: string;
135
256
  disabled?: boolean;
257
+ }
258
+ export interface StringSelect {
259
+ type: ComponentTypes.StringSelect;
136
260
  id?: number;
261
+ customID: string;
262
+ options: Array<SelectOption>;
263
+ placeholder?: string;
264
+ minValues?: number;
265
+ maxValues?: number;
266
+ required?: boolean;
267
+ disabled?: boolean;
137
268
  }
138
- export interface Container {
139
- type: ComponentTypes.Container;
269
+ export interface StringSelectInteractionResponse {
270
+ type: ComponentTypes.StringSelect;
271
+ componentType: ComponentTypes.StringSelect;
272
+ id: number;
273
+ customID: string;
274
+ values: Array<string>;
275
+ }
276
+ export interface SelectOption {
277
+ label: string;
278
+ value: string;
279
+ description?: string;
280
+ emoji?: Pick<Emoji, "name" | "id" | "animated">;
281
+ default?: boolean;
282
+ }
283
+ export interface TextInput {
284
+ type: ComponentTypes.TextInput;
140
285
  id?: number;
141
- components: Array<ActionRow | TextDisplay | Section | MediaGallery | Separator | File>;
142
- accentColor?: number | null;
143
- spoiler?: boolean;
286
+ customID: string;
287
+ style: TextInputStyles;
288
+ minLength?: number;
289
+ maxLength?: number;
290
+ required?: boolean;
291
+ value?: string;
292
+ placeholder?: string;
293
+ label: string;
144
294
  }
145
- export interface File {
146
- type: ComponentTypes.File;
295
+ export interface TextInputInteractionResponse {
296
+ type: ComponentTypes.TextInput;
297
+ id: number;
298
+ customID: string;
299
+ value: string;
300
+ }
301
+ export interface UserSelect {
302
+ type: ComponentTypes.UserSelect;
147
303
  id?: number;
148
- file: UnfurledMediaItem;
149
- spoiler?: boolean;
150
- name: string;
151
- size: number;
304
+ customID: string;
305
+ placeholder?: string;
306
+ defaultValues?: Array<DefaultValue>;
307
+ minValues?: number;
308
+ maxValues?: number;
309
+ disabled?: boolean;
152
310
  }
153
- export interface MediaGallery {
154
- type: ComponentTypes.MediaGallery;
311
+ export interface UserSelectInteractionResponse {
312
+ type: ComponentTypes.UserSelect;
313
+ componentType: ComponentTypes.UserSelect;
314
+ id: number;
315
+ customID: string;
316
+ resolved: ResolvedData;
317
+ values: Array<snowflake>;
318
+ }
319
+ export interface DefaultValue {
320
+ id: snowflake;
321
+ type: "user" | "role" | "channel";
322
+ }
323
+ export interface RoleSelect {
324
+ type: ComponentTypes.RoleSelect;
155
325
  id?: number;
156
- items: Array<MediaGalleryItem>;
326
+ customID: string;
327
+ placeholder?: string;
328
+ defaultValues?: Array<DefaultValue>;
329
+ minValues?: number;
330
+ maxValues?: number;
331
+ disabled?: boolean;
157
332
  }
158
- export interface MediaGalleryItem {
159
- media: UnfurledMediaItem;
160
- description?: string;
161
- spoiler?: boolean;
333
+ export interface RoleSelectInteractionResponse {
334
+ type: ComponentTypes.RoleSelect;
335
+ componentType: ComponentTypes.RoleSelect;
336
+ id: number;
337
+ customID: string;
338
+ resolved: ResolvedData;
339
+ values: Array<snowflake>;
162
340
  }
163
- export interface Section {
164
- type: ComponentTypes.Section;
341
+ export interface MentionableSelect {
342
+ type: ComponentTypes.MentionableSelect;
165
343
  id?: number;
166
- components: Array<TextDisplay>;
167
- accessory: Thumbnail | Button;
344
+ customID: string;
345
+ placeholder?: string;
346
+ defaultValues?: Array<DefaultValue>;
347
+ minValues?: number;
348
+ maxValues?: number;
349
+ disabled?: boolean;
350
+ }
351
+ export interface MentionableSelectInteractionResponse {
352
+ type: ComponentTypes.MentionableSelect;
353
+ componentType: ComponentTypes.MentionableSelect;
354
+ id: number;
355
+ customID: string;
356
+ resolved: ResolvedData;
357
+ values: Array<snowflake>;
168
358
  }
169
- export interface SelectMenu {
170
- type: ComponentTypes.ChannelSelect | ComponentTypes.MentionableSelect | ComponentTypes.RoleSelect | ComponentTypes.StringSelect | ComponentTypes.UserSelect;
359
+ export interface ChannelSelect {
360
+ type: ComponentTypes.ChannelSelect;
361
+ id?: number;
171
362
  customID: string;
172
- options?: Array<SelectOption>;
173
363
  channelTypes?: Array<ChannelTypes>;
174
364
  placeholder?: string;
175
365
  defaultValues?: Array<DefaultValue>;
176
366
  minValues?: number;
177
367
  maxValues?: number;
178
368
  disabled?: boolean;
179
- id?: number;
180
369
  }
181
- export interface SelectOption {
182
- label: string;
183
- value: string;
184
- description?: string;
185
- emoji?: Pick<Emoji, "name" | "id" | "animated">;
186
- default?: boolean;
370
+ export interface ChannelSelectInteractionResponse {
371
+ type: ComponentTypes.ChannelSelect;
372
+ componentType: ComponentTypes.ChannelSelect;
373
+ id: number;
374
+ customID: string;
375
+ resolved: ResolvedData;
376
+ values: Array<snowflake>;
187
377
  }
188
- export interface Separator {
189
- type: ComponentTypes.Separator;
378
+ export interface Section {
379
+ type: ComponentTypes.Section;
190
380
  id?: number;
191
- divider?: boolean;
192
- spacing?: SeparatorSpacing;
381
+ components: Array<TextDisplay>;
382
+ accessory: Button | Thumbnail;
193
383
  }
194
384
  export interface TextDisplay {
195
385
  type: ComponentTypes.TextDisplay;
196
386
  id?: number;
197
387
  content: string;
198
388
  }
389
+ export interface TextDisplayInteractionResponse {
390
+ type: ComponentTypes.TextDisplay;
391
+ id: number;
392
+ }
199
393
  export interface Thumbnail {
200
394
  type: ComponentTypes.Thumbnail;
201
395
  id?: number;
@@ -203,26 +397,48 @@ export interface Thumbnail {
203
397
  description?: string;
204
398
  spoiler?: boolean;
205
399
  }
206
- export interface DefaultValue {
207
- id: snowflake;
208
- type: string;
400
+ export interface MediaGallery {
401
+ type: ComponentTypes.MediaGallery;
402
+ id?: number;
403
+ items: Array<MediaGalleryItem>;
209
404
  }
210
- export interface TextInput {
211
- type: ComponentTypes.TextInput;
212
- customID: string;
213
- style: TextInputStyles;
214
- label: string;
215
- minLength?: number;
216
- maxLength?: number;
217
- required?: boolean;
218
- value?: string;
219
- placeholder?: string;
405
+ export interface MediaGalleryItem {
406
+ media: UnfurledMediaItem;
407
+ description?: string;
408
+ spoiler?: boolean;
409
+ }
410
+ export interface File {
411
+ type: ComponentTypes.File;
220
412
  id?: number;
413
+ file: UnfurledMediaItem;
414
+ spoiler?: boolean;
415
+ name: string;
416
+ size: number;
221
417
  }
222
- export interface ActionRow {
223
- type: ComponentTypes.ActionRow;
224
- components: Array<Button | SelectMenu | TextInput>;
418
+ export interface Separator {
419
+ type: ComponentTypes.Separator;
225
420
  id?: number;
421
+ divider?: boolean;
422
+ spacing?: SeparatorSpacing;
423
+ }
424
+ export interface Container {
425
+ type: ComponentTypes.Container;
426
+ id?: number;
427
+ components: Array<ActionRow | TextDisplay | Section | MediaGallery | Separator | File>;
428
+ accentColor?: number | null;
429
+ spoiler?: boolean;
430
+ }
431
+ export interface Label {
432
+ type: ComponentTypes.Label;
433
+ id?: number;
434
+ label: string;
435
+ description?: string;
436
+ component: TextInput | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect;
437
+ }
438
+ export interface LabelInteractionResponse {
439
+ type: ComponentTypes.Label;
440
+ id: number;
441
+ component: TextInputInteractionResponse | StringSelectInteractionResponse | UserSelectInteractionResponse | RoleSelectInteractionResponse | MentionableSelectInteractionResponse | ChannelSelectInteractionResponse;
226
442
  }
227
443
  export interface UnfurledMediaItem {
228
444
  url: string;
@@ -4,7 +4,7 @@ import type { Channel, RawChannel, RawRoleSubscriptionData, RoleSubscriptionData
4
4
  import type { snowflake, timestamp } from "./common";
5
5
  import type { Emoji, RawEmoji } from "./emoji";
6
6
  import type { MessageInteraction, RawMessageInteraction, RawResolvedData, ResolvedData } from "./interaction";
7
- import type { ActionRow, Container, File, MediaGallery, RawActionRow, RawContainer, RawFile, RawMediaGallery, RawSection, RawSeparator, RawTextDisplay, Section, Separator, TextDisplay } from "./message-components";
7
+ import type { ActionRow, Container, File, MediaGallery, RawActionRow, RawContainer, RawFile, RawMediaGallery, RawSection, RawSeparator, RawTextDisplay, Section, Separator, TextDisplay } from "./components";
8
8
  import type { Poll, RawPoll } from "./poll";
9
9
  import type { RawStickerItem, RawSticker, Sticker, StickerItem } from "./sticker";
10
10
  import type { RawUser, User } from "./user";
@@ -38,7 +38,7 @@ export interface RawMessage {
38
38
  interaction_metadata?: RawMessageInteractionMetadata;
39
39
  interaction?: RawMessageInteraction;
40
40
  thread?: RawChannel;
41
- components?: Array<RawMessageTopLevelComponent>;
41
+ components?: Array<RawActionRow | RawSection | RawTextDisplay | RawMediaGallery | RawFile | RawSeparator | RawContainer>;
42
42
  sticker_items?: Array<RawStickerItem>;
43
43
  stickers?: Array<RawSticker>;
44
44
  position?: number;
@@ -47,7 +47,6 @@ export interface RawMessage {
47
47
  poll?: RawPoll;
48
48
  call?: RawMessageCall;
49
49
  }
50
- export type RawMessageTopLevelComponent = RawActionRow | RawTextDisplay | RawContainer | RawFile | RawSection | RawSeparator | RawMediaGallery;
51
50
  /** https://discord.com/developers/docs/resources/message#message-object-message-activity-structure */
52
51
  export interface RawMessageActivity {
53
52
  type: MessageActivityTypes;
@@ -231,7 +230,7 @@ export interface Message {
231
230
  interactionMetadata?: MessageInteractionMetadata;
232
231
  interaction?: MessageInteraction;
233
232
  thread?: Channel;
234
- components?: Array<MessageTopLevelComponent>;
233
+ components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container>;
235
234
  stickerItems?: Array<StickerItem>;
236
235
  stickers?: Array<Sticker>;
237
236
  position?: number;
@@ -240,7 +239,6 @@ export interface Message {
240
239
  poll?: Poll;
241
240
  call?: MessageCall;
242
241
  }
243
- export type MessageTopLevelComponent = ActionRow | TextDisplay | Container | File | Section | Separator | MediaGallery;
244
242
  export interface MessageActivity {
245
243
  type: MessageActivityTypes;
246
244
  partyID?: string;
@@ -29,7 +29,7 @@ export interface RawRoleTags {
29
29
  export interface RawRoleColors {
30
30
  primary_color: number;
31
31
  secondary_color: number | null;
32
- tertiary_colors: number | null;
32
+ tertiary_color: number | null;
33
33
  }
34
34
  export interface Role {
35
35
  id: snowflake;
@@ -57,5 +57,5 @@ export interface RoleTags {
57
57
  export interface RoleColors {
58
58
  primaryColor: number;
59
59
  secondaryColor: number | null;
60
- tertiaryColors: number | null;
60
+ tertiaryColor: number | null;
61
61
  }
@@ -1,4 +1,4 @@
1
- import { GuildNavigationTypes, TimestampStyles } from "../constants";
1
+ import { GuildNavigationTypes, type TimestampStyles } from "../constants";
2
2
  import type { snowflake } from "../types/common";
3
3
  /** https://discord.com/developers/docs/reference#message-formatting-formats */
4
4
  export declare function userMention(userID: snowflake): string;
@@ -52,6 +52,6 @@ function email(username, domain) {
52
52
  exports.email = email;
53
53
  /** https://discord.com/developers/docs/reference#message-formatting-formats */
54
54
  function phoneNumber(number) {
55
- return `<+${phoneNumber}>`;
55
+ return `<+${number}>`;
56
56
  }
57
57
  exports.phoneNumber = phoneNumber;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.2.7-dev.fca4921",
3
+ "version": "2.2.7",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "homepage": "https://github.com/sergiogotuzzo/disgroove#readme",
27
27
  "devDependencies": {
28
- "@types/node": "^22.16.3",
28
+ "@types/node": "^22.18.1",
29
29
  "@types/ws": "^8.18.1",
30
- "typescript": "^5.8.3",
31
- "undici-types": "^7.11.0"
30
+ "typescript": "^5.9.2",
31
+ "undici-types": "^7.16.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "ws": "^8.18.3"