disgroove 2.2.7-dev.5357ecd → 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.
@@ -487,6 +487,9 @@ export declare class Client extends EventEmitter {
487
487
  /** https://discord.com/developers/docs/resources/guild#modify-current-member */
488
488
  editCurrentGuildMember(guildID: snowflake, options: {
489
489
  nick?: string | null;
490
+ banner?: string | null;
491
+ avatar?: string | null;
492
+ bio?: string | null;
490
493
  }, reason?: string): Promise<GuildMember>;
491
494
  /** https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state */
492
495
  editCurrentUserVoiceState(guildID: snowflake, options: {
@@ -340,6 +340,11 @@ class Client extends node_events_1.default {
340
340
  name: options.name,
341
341
  permissions: options.permissions,
342
342
  color: options.color,
343
+ colors: {
344
+ primary_color: options.colors?.primaryColor,
345
+ secondary_color: options.colors?.secondaryColor,
346
+ tertiary_color: options.colors?.tertiaryColor,
347
+ },
343
348
  hoist: options.hoist,
344
349
  icon: options.icon,
345
350
  unicode_emoji: options.unicodeEmoji,
@@ -984,9 +989,7 @@ class Client extends node_events_1.default {
984
989
  /** https://discord.com/developers/docs/resources/guild#modify-current-member */
985
990
  async editCurrentGuildMember(guildID, options, reason) {
986
991
  const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildMember(guildID), {
987
- json: {
988
- nick: options.nick,
989
- },
992
+ json: options,
990
993
  reason,
991
994
  });
992
995
  return transformers_1.Guilds.guildMemberFromRaw(response);
@@ -1167,6 +1170,11 @@ class Client extends node_events_1.default {
1167
1170
  name: options?.name,
1168
1171
  permissions: options?.permissions,
1169
1172
  color: options?.color,
1173
+ colors: {
1174
+ primary_color: options?.colors?.primaryColor,
1175
+ secondary_color: options?.colors?.secondaryColor,
1176
+ tertiary_color: options?.colors?.tertiaryColor,
1177
+ },
1170
1178
  hoist: options?.hoist,
1171
1179
  icon: options?.icon,
1172
1180
  unicode_emoji: options?.unicodeEmoji,
@@ -1179,6 +1179,7 @@ export declare enum JSONErrorCodes {
1179
1179
  MessageBlockedByHarmfulLinksFilter = 240000,
1180
1180
  CannotEnableOnboardingRequirementsAreNotMet = 350000,
1181
1181
  CannotUpdateOnboardingWhileBelowRequirements = 350001,
1182
+ AccessToFileUploadsHasBeenLimitedForThisGuild = 400001,
1182
1183
  FailedToBanUsers = 500000,
1183
1184
  PollVotingBlocked = 520000,
1184
1185
  PollExpired = 520001,
@@ -1269,6 +1269,7 @@ var JSONErrorCodes;
1269
1269
  JSONErrorCodes[JSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
1270
1270
  JSONErrorCodes[JSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet";
1271
1271
  JSONErrorCodes[JSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements";
1272
+ JSONErrorCodes[JSONErrorCodes["AccessToFileUploadsHasBeenLimitedForThisGuild"] = 400001] = "AccessToFileUploadsHasBeenLimitedForThisGuild";
1272
1273
  JSONErrorCodes[JSONErrorCodes["FailedToBanUsers"] = 500000] = "FailedToBanUsers";
1273
1274
  JSONErrorCodes[JSONErrorCodes["PollVotingBlocked"] = 520000] = "PollVotingBlocked";
1274
1275
  JSONErrorCodes[JSONErrorCodes["PollExpired"] = 520001] = "PollExpired";
@@ -393,6 +393,7 @@ class Shard {
393
393
  : undefined,
394
394
  temporary: packet.d.temporary,
395
395
  uses: packet.d.uses,
396
+ expiresAt: packet.d.expires_at,
396
397
  });
397
398
  break;
398
399
  case constants_1.GatewayEvents.InviteDelete:
@@ -186,11 +186,23 @@ class Components {
186
186
  static labelFromRaw(label) {
187
187
  let component;
188
188
  switch (label.component.type) {
189
+ case constants_js_1.ComponentTypes.TextInput:
190
+ component = Components.textInputFromRaw(label.component);
191
+ break;
189
192
  case constants_js_1.ComponentTypes.StringSelect:
190
193
  component = Components.stringSelectFromRaw(label.component);
191
194
  break;
192
- case constants_js_1.ComponentTypes.TextInput:
193
- component = Components.textInputFromRaw(label.component);
195
+ case constants_js_1.ComponentTypes.UserSelect:
196
+ component = Components.userSelectFromRaw(label.component);
197
+ break;
198
+ case constants_js_1.ComponentTypes.RoleSelect:
199
+ component = Components.roleSelectFromRaw(label.component);
200
+ break;
201
+ case constants_js_1.ComponentTypes.MentionableSelect:
202
+ component = Components.mentionableSelectFromRaw(label.component);
203
+ break;
204
+ case constants_js_1.ComponentTypes.ChannelSelect:
205
+ component = Components.channelSelectFromRaw(label.component);
194
206
  break;
195
207
  }
196
208
  return {
@@ -204,11 +216,23 @@ class Components {
204
216
  static labelToRaw(label) {
205
217
  let component;
206
218
  switch (label.component.type) {
219
+ case constants_js_1.ComponentTypes.TextInput:
220
+ component = Components.textInputToRaw(label.component);
221
+ break;
207
222
  case constants_js_1.ComponentTypes.StringSelect:
208
223
  component = Components.stringSelectToRaw(label.component);
209
224
  break;
210
- case constants_js_1.ComponentTypes.TextInput:
211
- component = Components.textInputToRaw(label.component);
225
+ case constants_js_1.ComponentTypes.UserSelect:
226
+ component = Components.userSelectToRaw(label.component);
227
+ break;
228
+ case constants_js_1.ComponentTypes.RoleSelect:
229
+ component = Components.roleSelectToRaw(label.component);
230
+ break;
231
+ case constants_js_1.ComponentTypes.MentionableSelect:
232
+ component = Components.mentionableSelectToRaw(label.component);
233
+ break;
234
+ case constants_js_1.ComponentTypes.ChannelSelect:
235
+ component = Components.channelSelectToRaw(label.component);
212
236
  break;
213
237
  }
214
238
  return {
@@ -8,7 +8,6 @@ const Entitlements_1 = require("./Entitlements");
8
8
  const Roles_1 = require("./Roles");
9
9
  const Messages_1 = require("./Messages");
10
10
  const constants_1 = require("../constants");
11
- const Components_1 = require("./Components");
12
11
  class Interactions {
13
12
  static interactionCallbackResponseFromRaw(interactionCallbackResponse) {
14
13
  return {
@@ -78,6 +77,13 @@ class Interactions {
78
77
  type: constants_1.ComponentTypes.ActionRow,
79
78
  components: component.components.map((c) => {
80
79
  switch (c.type) {
80
+ case constants_1.ComponentTypes.TextInput:
81
+ return {
82
+ type: c.type,
83
+ id: c.id,
84
+ customID: c.custom_id,
85
+ value: c.value,
86
+ };
81
87
  case constants_1.ComponentTypes.StringSelect:
82
88
  return {
83
89
  type: c.type,
@@ -86,21 +92,61 @@ class Interactions {
86
92
  customID: c.custom_id,
87
93
  values: c.values,
88
94
  };
89
- case constants_1.ComponentTypes.TextInput:
95
+ case constants_1.ComponentTypes.UserSelect:
96
+ return {
97
+ type: c.type,
98
+ componentType: c.component_type,
99
+ id: c.id,
100
+ customID: c.custom_id,
101
+ resolved: this.resolvedDataFromRaw(c.resolved),
102
+ values: c.values,
103
+ };
104
+ case constants_1.ComponentTypes.RoleSelect:
90
105
  return {
91
106
  type: c.type,
107
+ componentType: c.component_type,
92
108
  id: c.id,
93
109
  customID: c.custom_id,
94
- value: c.value,
110
+ resolved: this.resolvedDataFromRaw(c.resolved),
111
+ values: c.values,
112
+ };
113
+ case constants_1.ComponentTypes.MentionableSelect:
114
+ return {
115
+ type: c.type,
116
+ componentType: c.component_type,
117
+ id: c.id,
118
+ customID: c.custom_id,
119
+ resolved: this.resolvedDataFromRaw(c.resolved),
120
+ values: c.values,
121
+ };
122
+ case constants_1.ComponentTypes.ChannelSelect:
123
+ return {
124
+ type: c.type,
125
+ componentType: c.component_type,
126
+ id: c.id,
127
+ customID: c.custom_id,
128
+ resolved: this.resolvedDataFromRaw(c.resolved),
129
+ values: c.values,
95
130
  };
96
131
  }
97
132
  }),
98
133
  };
99
134
  case constants_1.ComponentTypes.TextDisplay:
100
- return Components_1.Components.textDisplayFromRaw(component);
135
+ return {
136
+ type: component.type,
137
+ id: component.id,
138
+ };
101
139
  case constants_1.ComponentTypes.Label: {
102
140
  let c;
103
141
  switch (component.component.type) {
142
+ case constants_1.ComponentTypes.TextInput:
143
+ c = {
144
+ type: component.component.type,
145
+ id: component.component.id,
146
+ customID: component.component.custom_id,
147
+ value: component.component.value,
148
+ };
149
+ break;
104
150
  case constants_1.ComponentTypes.StringSelect:
105
151
  c = {
106
152
  type: component.component.type,
@@ -110,20 +156,50 @@ class Interactions {
110
156
  values: component.component.values,
111
157
  };
112
158
  break;
113
- case constants_1.ComponentTypes.TextInput:
159
+ case constants_1.ComponentTypes.UserSelect:
114
160
  c = {
115
161
  type: component.component.type,
162
+ componentType: component.component.component_type,
116
163
  id: component.component.id,
117
164
  customID: component.component.custom_id,
118
- value: component.component.value,
165
+ resolved: this.resolvedDataFromRaw(component.component.resolved),
166
+ values: component.component.values,
167
+ };
168
+ break;
169
+ case constants_1.ComponentTypes.RoleSelect:
170
+ c = {
171
+ type: component.component.type,
172
+ componentType: component.component.component_type,
173
+ id: component.component.id,
174
+ customID: component.component.custom_id,
175
+ resolved: this.resolvedDataFromRaw(component.component.resolved),
176
+ values: component.component.values,
177
+ };
178
+ break;
179
+ case constants_1.ComponentTypes.MentionableSelect:
180
+ c = {
181
+ type: component.component.type,
182
+ componentType: component.component.component_type,
183
+ id: component.component.id,
184
+ customID: component.component.custom_id,
185
+ resolved: this.resolvedDataFromRaw(component.component.resolved),
186
+ values: component.component.values,
187
+ };
188
+ break;
189
+ case constants_1.ComponentTypes.ChannelSelect:
190
+ c = {
191
+ type: component.component.type,
192
+ componentType: component.component.component_type,
193
+ id: component.component.id,
194
+ customID: component.component.custom_id,
195
+ resolved: this.resolvedDataFromRaw(component.component.resolved),
196
+ values: component.component.values,
119
197
  };
120
198
  break;
121
199
  }
122
200
  return {
123
201
  type: component.type,
124
202
  id: component.id,
125
- label: component.label,
126
- description: component.description,
127
203
  component: c,
128
204
  };
129
205
  }
@@ -224,6 +300,13 @@ class Interactions {
224
300
  type: constants_1.ComponentTypes.ActionRow,
225
301
  components: component.components.map((c) => {
226
302
  switch (c.type) {
303
+ case constants_1.ComponentTypes.TextInput:
304
+ return {
305
+ type: c.type,
306
+ id: c.id,
307
+ custom_id: c.customID,
308
+ value: c.value,
309
+ };
227
310
  case constants_1.ComponentTypes.StringSelect:
228
311
  return {
229
312
  type: c.type,
@@ -232,21 +315,61 @@ class Interactions {
232
315
  custom_id: c.customID,
233
316
  values: c.values,
234
317
  };
235
- case constants_1.ComponentTypes.TextInput:
318
+ case constants_1.ComponentTypes.UserSelect:
319
+ return {
320
+ type: c.type,
321
+ component_type: c.componentType,
322
+ id: c.id,
323
+ custom_id: c.customID,
324
+ resolved: this.resolvedDataToRaw(c.resolved),
325
+ values: c.values,
326
+ };
327
+ case constants_1.ComponentTypes.RoleSelect:
236
328
  return {
237
329
  type: c.type,
330
+ component_type: c.componentType,
238
331
  id: c.id,
239
332
  custom_id: c.customID,
240
- value: c.value,
333
+ resolved: this.resolvedDataToRaw(c.resolved),
334
+ values: c.values,
335
+ };
336
+ case constants_1.ComponentTypes.MentionableSelect:
337
+ return {
338
+ type: c.type,
339
+ component_type: c.componentType,
340
+ id: c.id,
341
+ custom_id: c.customID,
342
+ resolved: this.resolvedDataToRaw(c.resolved),
343
+ values: c.values,
344
+ };
345
+ case constants_1.ComponentTypes.ChannelSelect:
346
+ return {
347
+ type: c.type,
348
+ component_type: c.componentType,
349
+ id: c.id,
350
+ custom_id: c.customID,
351
+ resolved: this.resolvedDataToRaw(c.resolved),
352
+ values: c.values,
241
353
  };
242
354
  }
243
355
  }),
244
356
  };
245
357
  case constants_1.ComponentTypes.TextDisplay:
246
- return Components_1.Components.textDisplayToRaw(component);
358
+ return {
359
+ type: component.type,
360
+ id: component.id,
361
+ };
247
362
  case constants_1.ComponentTypes.Label: {
248
363
  let c;
249
364
  switch (component.component.type) {
365
+ case constants_1.ComponentTypes.TextInput:
366
+ c = {
367
+ type: component.component.type,
368
+ id: component.component.id,
369
+ custom_id: component.component.customID,
370
+ value: component.component.value,
371
+ };
372
+ break;
250
373
  case constants_1.ComponentTypes.StringSelect:
251
374
  c = {
252
375
  type: component.component.type,
@@ -256,20 +379,50 @@ class Interactions {
256
379
  values: component.component.values,
257
380
  };
258
381
  break;
259
- case constants_1.ComponentTypes.TextInput:
382
+ case constants_1.ComponentTypes.UserSelect:
260
383
  c = {
261
384
  type: component.component.type,
385
+ component_type: component.component.componentType,
262
386
  id: component.component.id,
263
387
  custom_id: component.component.customID,
264
- value: component.component.value,
388
+ resolved: this.resolvedDataToRaw(component.component.resolved),
389
+ values: component.component.values,
390
+ };
391
+ break;
392
+ case constants_1.ComponentTypes.RoleSelect:
393
+ c = {
394
+ type: component.component.type,
395
+ component_type: component.component.componentType,
396
+ id: component.component.id,
397
+ custom_id: component.component.customID,
398
+ resolved: this.resolvedDataToRaw(component.component.resolved),
399
+ values: component.component.values,
400
+ };
401
+ break;
402
+ case constants_1.ComponentTypes.MentionableSelect:
403
+ c = {
404
+ type: component.component.type,
405
+ component_type: component.component.componentType,
406
+ id: component.component.id,
407
+ custom_id: component.component.customID,
408
+ resolved: this.resolvedDataToRaw(component.component.resolved),
409
+ values: component.component.values,
410
+ };
411
+ break;
412
+ case constants_1.ComponentTypes.ChannelSelect:
413
+ c = {
414
+ type: component.component.type,
415
+ component_type: component.component.componentType,
416
+ id: component.component.id,
417
+ custom_id: component.component.customID,
418
+ resolved: this.resolvedDataToRaw(component.component.resolved),
419
+ values: component.component.values,
265
420
  };
266
421
  break;
267
422
  }
268
423
  return {
269
424
  type: component.type,
270
425
  id: component.id,
271
- label: component.label,
272
- description: component.description,
273
426
  component: c,
274
427
  };
275
428
  }
@@ -10,7 +10,7 @@ class Roles {
10
10
  colors: {
11
11
  primaryColor: role.colors.primary_color,
12
12
  secondaryColor: role.colors.secondary_color,
13
- tertiaryColors: role.colors.tertiary_colors,
13
+ tertiaryColor: role.colors.tertiary_color,
14
14
  },
15
15
  hoist: role.hoist,
16
16
  icon: role.icon,
@@ -40,7 +40,7 @@ class Roles {
40
40
  colors: {
41
41
  primary_color: role.colors.primaryColor,
42
42
  secondary_color: role.colors.secondaryColor,
43
- tertiary_colors: role.colors.tertiaryColors,
43
+ tertiary_color: role.colors.tertiaryColor,
44
44
  },
45
45
  hoist: role.hoist,
46
46
  icon: role.icon,
@@ -49,7 +49,7 @@ export interface RawRequestGuildMembers {
49
49
  nonce?: string;
50
50
  }
51
51
  /** https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds-request-soundboard-sounds-structure */
52
- export interface RequestSoundboardSounds {
52
+ export interface RawRequestSoundboardSounds {
53
53
  guild_ids: Array<snowflake>;
54
54
  }
55
55
  /** https://discord.com/developers/docs/topics/gateway-events#update-presence-gateway-presence-update-structure */
@@ -207,6 +207,7 @@ export interface RawInviteCreateEventFields {
207
207
  target_application?: RawApplication;
208
208
  temporary: boolean;
209
209
  uses: number;
210
+ expires_at: timestamp | null;
210
211
  }
211
212
  /** https://discord.com/developers/docs/topics/gateway-events#invite-delete-invite-delete-event-fields */
212
213
  export interface RawInviteDeleteEventFields {
@@ -556,6 +557,7 @@ export interface InviteCreateEventFields {
556
557
  targetApplication?: Application;
557
558
  temporary: boolean;
558
559
  uses: number;
560
+ expiresAt: timestamp | null;
559
561
  }
560
562
  export interface InviteDeleteEventFields {
561
563
  channelID: snowflake;
@@ -6,7 +6,7 @@ import type { snowflake } from "./common";
6
6
  import type { RawEntitlement, Entitlement } from "./entitlements";
7
7
  import type { RawGuildMember, GuildMember, Guild, RawGuild } from "./guild";
8
8
  import type { RawMessage, RawAttachment, RawEmbed, RawAllowedMentions, Message, Attachment, Embed, AllowedMentions } from "./message";
9
- import type { ActionRow, Container, File, Label, MediaGallery, RawActionRow, RawContainer, RawFile, RawLabel, RawMediaGallery, RawSection, RawSeparator, RawStringSelectInteractionResponse, RawTextDisplay, RawTextInputInteractionResponse, Section, Separator, StringSelectInteractionResponse, TextDisplay, TextInputInteractionResponse } from "./message-components";
9
+ import type { ActionRow, ChannelSelectInteractionResponse, Container, File, Label, LabelInteractionResponse, MediaGallery, MentionableSelectInteractionResponse, RawActionRow, RawChannelSelectInteractionResponse, RawContainer, RawFile, RawLabel, RawLabelInteractionResponse, RawMediaGallery, RawMentionableSelectInteractionResponse, RawRoleSelectInteractionResponse, RawSection, RawSeparator, RawStringSelectInteractionResponse, RawTextDisplay, RawTextDisplayInteractionResponse, RawTextInputInteractionResponse, RawUserSelectInteractionResponse, RoleSelectInteractionResponse, Section, Separator, StringSelectInteractionResponse, TextDisplay, TextDisplayInteractionResponse, TextInputInteractionResponse, UserSelectInteractionResponse } from "./message-components";
10
10
  import type { RawPollCreateParams, PollCreateParams } from "./poll";
11
11
  import type { RawRole, Role } from "./role";
12
12
  import type { RawUser, User } from "./user";
@@ -57,10 +57,9 @@ export interface RawModalSubmitData {
57
57
  custom_id: string;
58
58
  components: Array<{
59
59
  type: ComponentTypes.ActionRow;
60
- components: Array<RawStringSelectInteractionResponse | RawTextInputInteractionResponse>;
61
- } | RawTextDisplay | (Omit<RawLabel, "component"> & {
62
- component: RawStringSelectInteractionResponse | RawTextInputInteractionResponse;
63
- })>;
60
+ components: Array<RawTextInputInteractionResponse | RawStringSelectInteractionResponse | RawUserSelectInteractionResponse | RawRoleSelectInteractionResponse | RawMentionableSelectInteractionResponse | RawChannelSelectInteractionResponse>;
61
+ } | RawTextDisplayInteractionResponse | RawLabelInteractionResponse>;
62
+ resolved?: RawResolvedData;
64
63
  }
65
64
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure */
66
65
  export interface RawResolvedData {
@@ -174,10 +173,9 @@ export interface ModalSubmitData {
174
173
  customID: string;
175
174
  components: Array<{
176
175
  type: ComponentTypes.ActionRow;
177
- components: Array<StringSelectInteractionResponse | TextInputInteractionResponse>;
178
- } | TextDisplay | (Omit<Label, "component"> & {
179
- component: StringSelectInteractionResponse | TextInputInteractionResponse;
180
- })>;
176
+ components: Array<TextInputInteractionResponse | StringSelectInteractionResponse | UserSelectInteractionResponse | RoleSelectInteractionResponse | MentionableSelectInteractionResponse | ChannelSelectInteractionResponse>;
177
+ } | TextDisplayInteractionResponse | LabelInteractionResponse>;
178
+ resolved?: ResolvedData;
181
179
  }
182
180
  export interface ResolvedData {
183
181
  users?: Record<snowflake, User>;
@@ -81,6 +81,7 @@ export interface RawUserSelect {
81
81
  }
82
82
  /** https://discord.com/developers/docs/components/reference#user-select-user-select-interaction-response-structure */
83
83
  export interface RawUserSelectInteractionResponse {
84
+ type: ComponentTypes.UserSelect;
84
85
  component_type: ComponentTypes.UserSelect;
85
86
  id: number;
86
87
  custom_id: string;
@@ -105,6 +106,7 @@ export interface RawRoleSelect {
105
106
  }
106
107
  /** https://discord.com/developers/docs/components/reference#role-select-role-select-interaction-response-structure */
107
108
  export interface RawRoleSelectInteractionResponse {
109
+ type: ComponentTypes.RoleSelect;
108
110
  component_type: ComponentTypes.RoleSelect;
109
111
  id: number;
110
112
  custom_id: string;
@@ -124,6 +126,7 @@ export interface RawMentionableSelect {
124
126
  }
125
127
  /** https://discord.com/developers/docs/components/reference#mentionable-select-mentionable-select-interaction-response-structure */
126
128
  export interface RawMentionableSelectInteractionResponse {
129
+ type: ComponentTypes.MentionableSelect;
127
130
  component_type: ComponentTypes.MentionableSelect;
128
131
  id: number;
129
132
  custom_id: string;
@@ -144,6 +147,7 @@ export interface RawChannelSelect {
144
147
  }
145
148
  /** https://discord.com/developers/docs/components/reference#channel-select-channel-select-interaction-response-structure */
146
149
  export interface RawChannelSelectInteractionResponse {
150
+ type: ComponentTypes.ChannelSelect;
147
151
  component_type: ComponentTypes.ChannelSelect;
148
152
  id: number;
149
153
  custom_id: string;
@@ -163,6 +167,11 @@ export interface RawTextDisplay {
163
167
  id?: number;
164
168
  content: string;
165
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
+ }
166
175
  /** https://discord.com/developers/docs/components/reference#thumbnail-thumbnail-structure */
167
176
  export interface RawThumbnail {
168
177
  type: ComponentTypes.Thumbnail;
@@ -213,7 +222,13 @@ export interface RawLabel {
213
222
  id?: number;
214
223
  label: string;
215
224
  description?: string;
216
- 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;
217
232
  }
218
233
  /** https://discord.com/developers/docs/components/reference#unfurled-media-item-unfurled-media-item-structure */
219
234
  export interface RawUnfurledMediaItem {
@@ -294,7 +309,8 @@ export interface UserSelect {
294
309
  disabled?: boolean;
295
310
  }
296
311
  export interface UserSelectInteractionResponse {
297
- component_type: ComponentTypes.UserSelect;
312
+ type: ComponentTypes.UserSelect;
313
+ componentType: ComponentTypes.UserSelect;
298
314
  id: number;
299
315
  customID: string;
300
316
  resolved: ResolvedData;
@@ -315,6 +331,7 @@ export interface RoleSelect {
315
331
  disabled?: boolean;
316
332
  }
317
333
  export interface RoleSelectInteractionResponse {
334
+ type: ComponentTypes.RoleSelect;
318
335
  componentType: ComponentTypes.RoleSelect;
319
336
  id: number;
320
337
  customID: string;
@@ -332,6 +349,7 @@ export interface MentionableSelect {
332
349
  disabled?: boolean;
333
350
  }
334
351
  export interface MentionableSelectInteractionResponse {
352
+ type: ComponentTypes.MentionableSelect;
335
353
  componentType: ComponentTypes.MentionableSelect;
336
354
  id: number;
337
355
  customID: string;
@@ -350,6 +368,7 @@ export interface ChannelSelect {
350
368
  disabled?: boolean;
351
369
  }
352
370
  export interface ChannelSelectInteractionResponse {
371
+ type: ComponentTypes.ChannelSelect;
353
372
  componentType: ComponentTypes.ChannelSelect;
354
373
  id: number;
355
374
  customID: string;
@@ -367,6 +386,10 @@ export interface TextDisplay {
367
386
  id?: number;
368
387
  content: string;
369
388
  }
389
+ export interface TextDisplayInteractionResponse {
390
+ type: ComponentTypes.TextDisplay;
391
+ id: number;
392
+ }
370
393
  export interface Thumbnail {
371
394
  type: ComponentTypes.Thumbnail;
372
395
  id?: number;
@@ -410,7 +433,12 @@ export interface Label {
410
433
  id?: number;
411
434
  label: string;
412
435
  description?: string;
413
- 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;
414
442
  }
415
443
  export interface UnfurledMediaItem {
416
444
  url: 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.5357ecd",
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.5357ecd",
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",