disgroove 2.2.7-dev.64580a3 → 2.2.7-dev.704bd88

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.
@@ -1,6 +1,7 @@
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";
4
5
  /** https://discord.com/developers/docs/components/reference#action-row-action-row-structure */
5
6
  export interface RawActionRow {
6
7
  type: ComponentTypes.ActionRow;
@@ -31,6 +32,14 @@ export interface RawStringSelect {
31
32
  required?: boolean;
32
33
  disabled?: boolean;
33
34
  }
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
+ }
34
43
  /** https://discord.com/developers/docs/components/reference#string-select-select-option-structure */
35
44
  export interface RawSelectOption {
36
45
  label: string;
@@ -50,6 +59,14 @@ export interface RawTextInput {
50
59
  required?: boolean;
51
60
  value?: string;
52
61
  placeholder?: string;
62
+ label: string;
63
+ }
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;
53
70
  }
54
71
  /** https://discord.com/developers/docs/components/reference#user-select-user-select-structure */
55
72
  export interface RawUserSelect {
@@ -62,6 +79,15 @@ export interface RawUserSelect {
62
79
  max_values?: number;
63
80
  disabled?: boolean;
64
81
  }
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
+ }
65
91
  /** https://discord.com/developers/docs/components/reference#user-select-select-default-value-structure */
66
92
  export interface RawDefaultValue {
67
93
  id: snowflake;
@@ -78,6 +104,15 @@ export interface RawRoleSelect {
78
104
  max_values?: number;
79
105
  disabled?: boolean;
80
106
  }
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>;
115
+ }
81
116
  /** https://discord.com/developers/docs/components/reference#mentionable-select-mentionable-select-structure */
82
117
  export interface RawMentionableSelect {
83
118
  type: ComponentTypes.MentionableSelect;
@@ -89,6 +124,15 @@ export interface RawMentionableSelect {
89
124
  max_values?: number;
90
125
  disabled?: boolean;
91
126
  }
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
+ }
92
136
  /** https://discord.com/developers/docs/components/reference#channel-select-channel-select-structure */
93
137
  export interface RawChannelSelect {
94
138
  type: ComponentTypes.ChannelSelect;
@@ -101,6 +145,15 @@ export interface RawChannelSelect {
101
145
  max_values?: number;
102
146
  disabled?: boolean;
103
147
  }
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>;
156
+ }
104
157
  /** https://discord.com/developers/docs/components/reference#section-section-structure */
105
158
  export interface RawSection {
106
159
  type: ComponentTypes.Section;
@@ -114,6 +167,11 @@ export interface RawTextDisplay {
114
167
  id?: number;
115
168
  content: string;
116
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
+ }
117
175
  /** https://discord.com/developers/docs/components/reference#thumbnail-thumbnail-structure */
118
176
  export interface RawThumbnail {
119
177
  type: ComponentTypes.Thumbnail;
@@ -164,7 +222,13 @@ export interface RawLabel {
164
222
  id?: number;
165
223
  label: string;
166
224
  description?: string;
167
- component: RawTextInput | RawStringSelect;
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;
168
232
  }
169
233
  /** https://discord.com/developers/docs/components/reference#unfurled-media-item-unfurled-media-item-structure */
170
234
  export interface RawUnfurledMediaItem {
@@ -202,6 +266,13 @@ export interface StringSelect {
202
266
  required?: boolean;
203
267
  disabled?: boolean;
204
268
  }
269
+ export interface StringSelectInteractionResponse {
270
+ type: ComponentTypes.StringSelect;
271
+ componentType: ComponentTypes.StringSelect;
272
+ id: number;
273
+ customID: string;
274
+ values: Array<string>;
275
+ }
205
276
  export interface SelectOption {
206
277
  label: string;
207
278
  value: string;
@@ -219,6 +290,13 @@ export interface TextInput {
219
290
  required?: boolean;
220
291
  value?: string;
221
292
  placeholder?: string;
293
+ label: string;
294
+ }
295
+ export interface TextInputInteractionResponse {
296
+ type: ComponentTypes.TextInput;
297
+ id: number;
298
+ customID: string;
299
+ value: string;
222
300
  }
223
301
  export interface UserSelect {
224
302
  type: ComponentTypes.UserSelect;
@@ -230,6 +308,14 @@ export interface UserSelect {
230
308
  maxValues?: number;
231
309
  disabled?: boolean;
232
310
  }
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
+ }
233
319
  export interface DefaultValue {
234
320
  id: snowflake;
235
321
  type: "user" | "role" | "channel";
@@ -244,6 +330,14 @@ export interface RoleSelect {
244
330
  maxValues?: number;
245
331
  disabled?: boolean;
246
332
  }
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>;
340
+ }
247
341
  export interface MentionableSelect {
248
342
  type: ComponentTypes.MentionableSelect;
249
343
  id?: number;
@@ -254,6 +348,14 @@ export interface MentionableSelect {
254
348
  maxValues?: number;
255
349
  disabled?: boolean;
256
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>;
358
+ }
257
359
  export interface ChannelSelect {
258
360
  type: ComponentTypes.ChannelSelect;
259
361
  id?: number;
@@ -265,6 +367,14 @@ export interface ChannelSelect {
265
367
  maxValues?: number;
266
368
  disabled?: boolean;
267
369
  }
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>;
377
+ }
268
378
  export interface Section {
269
379
  type: ComponentTypes.Section;
270
380
  id?: number;
@@ -276,6 +386,10 @@ export interface TextDisplay {
276
386
  id?: number;
277
387
  content: string;
278
388
  }
389
+ export interface TextDisplayInteractionResponse {
390
+ type: ComponentTypes.TextDisplay;
391
+ id: number;
392
+ }
279
393
  export interface Thumbnail {
280
394
  type: ComponentTypes.Thumbnail;
281
395
  id?: number;
@@ -319,7 +433,12 @@ export interface Label {
319
433
  id?: number;
320
434
  label: string;
321
435
  description?: string;
322
- component: TextInput | StringSelect;
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;
323
442
  }
324
443
  export interface UnfurledMediaItem {
325
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, Button, ChannelSelect, Container, File, MediaGallery, MentionableSelect, RawActionRow, RawButton, RawChannelSelect, RawContainer, RawFile, RawMediaGallery, RawMentionableSelect, RawRoleSelect, RawSection, RawSeparator, RawStringSelect, RawTextDisplay, RawThumbnail, RawUserSelect, RoleSelect, Section, Separator, StringSelect, TextDisplay, Thumbnail, UserSelect } from "./message-components";
7
+ import type { ActionRow, Container, File, MediaGallery, RawActionRow, RawContainer, RawFile, RawMediaGallery, RawSection, RawSeparator, RawTextDisplay, Section, Separator, TextDisplay } from "./message-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<RawActionRow | RawButton | RawStringSelect | RawUserSelect | RawRoleSelect | RawMentionableSelect | RawChannelSelect | RawSection | RawTextDisplay | RawThumbnail | RawMediaGallery | RawFile | RawSeparator | RawContainer>;
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;
@@ -230,7 +230,7 @@ export interface Message {
230
230
  interactionMetadata?: MessageInteractionMetadata;
231
231
  interaction?: MessageInteraction;
232
232
  thread?: Channel;
233
- components?: Array<ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | Section | TextDisplay | Thumbnail | MediaGallery | File | Separator | Container>;
233
+ components?: Array<ActionRow | Section | TextDisplay | MediaGallery | File | Separator | Container>;
234
234
  stickerItems?: Array<StickerItem>;
235
235
  stickers?: Array<Sticker>;
236
236
  position?: number;
@@ -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.64580a3",
3
+ "version": "2.2.7-dev.704bd88",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.2.7-dev.64580a3",
3
+ "version": "2.2.7-dev.704bd88",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",