disgroove 3.0.0 → 3.0.1-dev.59674f9

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.
@@ -103,6 +103,44 @@ class Components {
103
103
  disabled: channelSelect.disabled,
104
104
  };
105
105
  }
106
+ static checkboxFromRaw(checkbox) {
107
+ return {
108
+ type: checkbox.type,
109
+ id: checkbox.id,
110
+ customId: checkbox.custom_id,
111
+ default: checkbox.default,
112
+ };
113
+ }
114
+ static checkboxToRaw(checkbox) {
115
+ return {
116
+ type: checkbox.type,
117
+ id: checkbox.id,
118
+ custom_id: checkbox.customId,
119
+ default: checkbox.default,
120
+ };
121
+ }
122
+ static checkboxGroupFromRaw(checkboxGroup) {
123
+ return {
124
+ type: checkboxGroup.type,
125
+ id: checkboxGroup.id,
126
+ customId: checkboxGroup.custom_id,
127
+ options: checkboxGroup.options,
128
+ minValues: checkboxGroup.min_values,
129
+ maxValues: checkboxGroup.max_values,
130
+ required: checkboxGroup.required,
131
+ };
132
+ }
133
+ static checkboxGroupToRaw(checkboxGroup) {
134
+ return {
135
+ type: checkboxGroup.type,
136
+ id: checkboxGroup.id,
137
+ custom_id: checkboxGroup.customId,
138
+ options: checkboxGroup.options,
139
+ min_values: checkboxGroup.minValues,
140
+ max_values: checkboxGroup.maxValues,
141
+ required: checkboxGroup.required,
142
+ };
143
+ }
106
144
  static containerFromRaw(container) {
107
145
  return {
108
146
  type: container.type,
@@ -227,6 +265,14 @@ class Components {
227
265
  case constants_1.ComponentTypes.FileUpload:
228
266
  component = Components.fileUploadFromRaw(label.component);
229
267
  break;
268
+ case constants_1.ComponentTypes.RadioGroup:
269
+ component = Components.radioGroupFromRaw(label.component);
270
+ break;
271
+ case constants_1.ComponentTypes.CheckboxGroup:
272
+ component = Components.checkboxGroupFromRaw(label.component);
273
+ break;
274
+ case constants_1.ComponentTypes.Checkbox:
275
+ component = Components.checkboxFromRaw(label.component);
230
276
  }
231
277
  return {
232
278
  type: label.type,
@@ -260,6 +306,14 @@ class Components {
260
306
  case constants_1.ComponentTypes.FileUpload:
261
307
  component = Components.fileUploadToRaw(label.component);
262
308
  break;
309
+ case constants_1.ComponentTypes.RadioGroup:
310
+ component = Components.radioGroupToRaw(label.component);
311
+ break;
312
+ case constants_1.ComponentTypes.CheckboxGroup:
313
+ component = Components.checkboxGroupToRaw(label.component);
314
+ break;
315
+ case constants_1.ComponentTypes.Checkbox:
316
+ component = Components.checkboxToRaw(label.component);
263
317
  }
264
318
  return {
265
319
  type: label.type,
@@ -315,6 +369,24 @@ class Components {
315
369
  disabled: mentionableSelect.disabled,
316
370
  };
317
371
  }
372
+ static radioGroupFromRaw(radioGroup) {
373
+ return {
374
+ type: radioGroup.type,
375
+ id: radioGroup.id,
376
+ customId: radioGroup.custom_id,
377
+ options: radioGroup.options,
378
+ required: radioGroup.required,
379
+ };
380
+ }
381
+ static radioGroupToRaw(radioGroup) {
382
+ return {
383
+ type: radioGroup.type,
384
+ id: radioGroup.id,
385
+ custom_id: radioGroup.customId,
386
+ options: radioGroup.options,
387
+ required: radioGroup.required,
388
+ };
389
+ }
318
390
  static roleSelectFromRaw(roleSelect) {
319
391
  return {
320
392
  type: roleSelect.type,
@@ -9,4 +9,6 @@ export declare class Guilds {
9
9
  static guildToRaw(guild: Guild): RawGuild;
10
10
  static integrationFromRaw(integration: RawIntegration): Integration;
11
11
  static integrationToRaw(integration: Integration): RawIntegration;
12
+ static partialGuildFromRaw(guild: Partial<RawGuild>): Partial<Guild>;
13
+ static partialGuildToRaw(guild: Partial<Guild>): Partial<RawGuild>;
12
14
  }
@@ -119,6 +119,11 @@ class Guilds {
119
119
  }
120
120
  : null
121
121
  : undefined,
122
+ collectibles: guildMember.collectibles !== undefined
123
+ ? guildMember.collectibles !== null
124
+ ? Users_1.Users.collectiblesFromRaw(guildMember.collectibles)
125
+ : null
126
+ : undefined,
122
127
  };
123
128
  }
124
129
  static guildMemberToRaw(guildMember) {
@@ -145,6 +150,11 @@ class Guilds {
145
150
  }
146
151
  : null
147
152
  : undefined,
153
+ collectibles: guildMember.collectibles !== undefined
154
+ ? guildMember.collectibles !== null
155
+ ? Users_1.Users.collectiblesToRaw(guildMember.collectibles)
156
+ : null
157
+ : undefined,
148
158
  };
149
159
  }
150
160
  static guildToRaw(guild) {
@@ -276,5 +286,139 @@ class Guilds {
276
286
  scopes: integration.scopes,
277
287
  };
278
288
  }
289
+ static partialGuildFromRaw(guild) {
290
+ return {
291
+ id: guild.id,
292
+ name: guild.name,
293
+ icon: guild.icon,
294
+ iconHash: guild.icon,
295
+ splash: guild.splash,
296
+ discoverySplash: guild.discovery_splash,
297
+ owner: guild.owner,
298
+ ownerId: guild.owner_id,
299
+ permissions: guild.permissions,
300
+ region: guild.region,
301
+ afkChannelId: guild.afk_channel_id,
302
+ afkTimeout: guild.afk_timeout,
303
+ widgetEnabled: guild.widget_enabled,
304
+ widgetChannelId: guild.widget_channel_id,
305
+ verificationLevel: guild.verification_level,
306
+ defaultMessageNotifications: guild.default_message_notifications,
307
+ explicitContentFilter: guild.explicit_content_filter,
308
+ roles: guild.roles?.map((role) => Roles_1.Roles.roleFromRaw(role)),
309
+ emojis: guild.emojis?.map((emoji) => Emojis_1.Emojis.emojiFromRaw(emoji)),
310
+ features: guild.features,
311
+ mfaLevel: guild.mfa_level,
312
+ applicationId: guild.application_id,
313
+ systemChannelId: guild.system_channel_id,
314
+ systemChannelFlags: guild.system_channel_flags,
315
+ rulesChannelId: guild.rules_channel_id,
316
+ maxPresences: guild.max_presences,
317
+ maxMembers: guild.max_members,
318
+ vanityURLCode: guild.vanity_url_code,
319
+ description: guild.description,
320
+ banner: guild.banner,
321
+ premiumTier: guild.premium_tier,
322
+ premiumSubscriptionCount: guild.premium_subscription_count,
323
+ preferredLocale: guild.preferred_locale,
324
+ publicUpdatesChannelId: guild.public_updates_channel_id,
325
+ maxVideoChannelUsers: guild.max_video_channel_users,
326
+ maxStageVideoChannelUsers: guild.max_stage_video_channel_users,
327
+ approximateMemberCount: guild.approximate_member_count,
328
+ approximatePresenceCount: guild.approximate_presence_count,
329
+ welcomeScreen: guild.welcome_screen !== undefined
330
+ ? {
331
+ description: guild.welcome_screen.description,
332
+ welcomeChannels: guild.welcome_screen.welcome_channels.map((welcomeScreenChannel) => ({
333
+ channelId: welcomeScreenChannel.channel_id,
334
+ description: welcomeScreenChannel.description,
335
+ emojiId: welcomeScreenChannel.emoji_id,
336
+ emojiName: welcomeScreenChannel.emoji_name,
337
+ })),
338
+ }
339
+ : undefined,
340
+ nsfwLevel: guild.nsfw_level,
341
+ stickers: guild.stickers?.map((sticker) => Stickers_1.Stickers.stickerFromRaw(sticker)),
342
+ premiumProgressBarEnabled: guild.premium_progress_bar_enabled,
343
+ safetyAlertsChannelId: guild.safety_alerts_channel_id,
344
+ incidentsData: guild.incidents_data !== undefined
345
+ ? guild.incidents_data !== null
346
+ ? {
347
+ invitesDisabledUntil: guild.incidents_data.invites_disabled_until,
348
+ dmsDisabledUntil: guild.incidents_data.dms_disabled_until,
349
+ dmSpamDetectedAt: guild.incidents_data.dm_spam_detected_at,
350
+ raidDetectedAt: guild.incidents_data.raid_detected_at,
351
+ }
352
+ : null
353
+ : undefined,
354
+ };
355
+ }
356
+ static partialGuildToRaw(guild) {
357
+ return {
358
+ id: guild.id,
359
+ name: guild.name,
360
+ icon: guild.icon,
361
+ icon_hash: guild.icon,
362
+ splash: guild.splash,
363
+ discovery_splash: guild.discoverySplash,
364
+ owner: guild.owner,
365
+ owner_id: guild.ownerId,
366
+ permissions: guild.permissions,
367
+ region: guild.region,
368
+ afk_channel_id: guild.afkChannelId,
369
+ afk_timeout: guild.afkTimeout,
370
+ widget_enabled: guild.widgetEnabled,
371
+ widget_channel_id: guild.widgetChannelId,
372
+ verification_level: guild.verificationLevel,
373
+ default_message_notifications: guild.defaultMessageNotifications,
374
+ explicit_content_filter: guild.explicitContentFilter,
375
+ roles: guild.roles?.map((role) => Roles_1.Roles.roleToRaw(role)),
376
+ emojis: guild.emojis?.map((emoji) => Emojis_1.Emojis.emojiToRaw(emoji)),
377
+ features: guild.features,
378
+ mfa_level: guild.mfaLevel,
379
+ application_id: guild.applicationId,
380
+ system_channel_id: guild.systemChannelId,
381
+ system_channel_flags: guild.systemChannelFlags,
382
+ rules_channel_id: guild.rulesChannelId,
383
+ max_presences: guild.maxPresences,
384
+ max_members: guild.maxMembers,
385
+ vanity_url_code: guild.vanityURLCode,
386
+ description: guild.description,
387
+ banner: guild.banner,
388
+ premium_tier: guild.premiumTier,
389
+ premium_subscription_count: guild.premiumSubscriptionCount,
390
+ preferred_locale: guild.preferredLocale,
391
+ public_updates_channel_id: guild.publicUpdatesChannelId,
392
+ max_video_channel_users: guild.maxVideoChannelUsers,
393
+ max_stage_video_channel_users: guild.maxStageVideoChannelUsers,
394
+ approximate_member_count: guild.approximateMemberCount,
395
+ approximate_presence_count: guild.approximatePresenceCount,
396
+ welcome_screen: guild.welcomeScreen !== undefined
397
+ ? {
398
+ description: guild.welcomeScreen.description,
399
+ welcome_channels: guild.welcomeScreen.welcomeChannels.map((welcomeScreenChannel) => ({
400
+ channel_id: welcomeScreenChannel.channelId,
401
+ description: welcomeScreenChannel.description,
402
+ emoji_id: welcomeScreenChannel.emojiId,
403
+ emoji_name: welcomeScreenChannel.emojiName,
404
+ })),
405
+ }
406
+ : undefined,
407
+ nsfw_level: guild.nsfwLevel,
408
+ stickers: guild.stickers?.map((sticker) => Stickers_1.Stickers.stickerToRaw(sticker)),
409
+ premium_progress_bar_enabled: guild.premiumProgressBarEnabled,
410
+ safety_alerts_channel_id: guild.safetyAlertsChannelId,
411
+ incidents_data: guild.incidentsData !== undefined
412
+ ? guild.incidentsData !== null
413
+ ? {
414
+ invites_disabled_until: guild.incidentsData.invitesDisabledUntil,
415
+ dms_disabled_until: guild.incidentsData.dmsDisabledUntil,
416
+ dm_spam_detected_at: guild.incidentsData.dmSpamDetectedAt,
417
+ raid_detected_at: guild.incidentsData.raidDetectedAt,
418
+ }
419
+ : null
420
+ : undefined,
421
+ };
422
+ }
279
423
  }
280
424
  exports.Guilds = Guilds;
@@ -211,6 +211,29 @@ class Interactions {
211
211
  values: component.component.values,
212
212
  };
213
213
  break;
214
+ case constants_1.ComponentTypes.RadioGroup:
215
+ c = {
216
+ type: component.component.type,
217
+ id: component.component.id,
218
+ customId: component.component.custom_id,
219
+ value: component.component.value
220
+ };
221
+ break;
222
+ case constants_1.ComponentTypes.CheckboxGroup:
223
+ c = {
224
+ type: component.component.type,
225
+ id: component.component.id,
226
+ customId: component.component.custom_id,
227
+ values: component.component.values,
228
+ };
229
+ break;
230
+ case constants_1.ComponentTypes.Checkbox:
231
+ c = {
232
+ type: component.component.type,
233
+ id: component.component.id,
234
+ customId: component.component.custom_id,
235
+ value: component.component.value
236
+ };
214
237
  }
215
238
  return {
216
239
  type: component.type,
@@ -449,6 +472,29 @@ class Interactions {
449
472
  values: component.component.values,
450
473
  };
451
474
  break;
475
+ case constants_1.ComponentTypes.RadioGroup:
476
+ c = {
477
+ type: component.component.type,
478
+ id: component.component.id,
479
+ custom_id: component.component.customId,
480
+ value: component.component.value
481
+ };
482
+ break;
483
+ case constants_1.ComponentTypes.CheckboxGroup:
484
+ c = {
485
+ type: component.component.type,
486
+ id: component.component.id,
487
+ custom_id: component.component.customId,
488
+ values: component.component.values,
489
+ };
490
+ break;
491
+ case constants_1.ComponentTypes.Checkbox:
492
+ c = {
493
+ type: component.component.type,
494
+ id: component.component.id,
495
+ custom_id: component.component.customId,
496
+ value: component.component.value
497
+ };
452
498
  }
453
499
  return {
454
500
  type: component.type,
@@ -1,5 +1,8 @@
1
1
  import type { RawInvite, Invite } from "../types/invite";
2
+ import { RawRole, Role } from "../types/role";
2
3
  export declare class Invites {
3
4
  static inviteFromRaw(invite: RawInvite): Invite;
4
5
  static inviteToRaw(invite: Invite): RawInvite;
6
+ static partialRoleFromRaw(role: Pick<RawRole, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicode_emoji">): Pick<Role, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicodeEmoji">;
7
+ static partialRoleToRaw(role: Pick<Role, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicodeEmoji">): Pick<RawRole, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicode_emoji">;
5
8
  }
@@ -12,7 +12,7 @@ class Invites {
12
12
  type: invite.type,
13
13
  code: invite.code,
14
14
  guild: invite.guild !== undefined
15
- ? Guilds_1.Guilds.guildFromRaw(invite.guild)
15
+ ? Guilds_1.Guilds.partialGuildFromRaw(invite.guild)
16
16
  : undefined,
17
17
  channel: Channels_1.Channels.channelFromRaw(invite.channel),
18
18
  inviter: invite.inviter !== undefined
@@ -40,6 +40,7 @@ class Invites {
40
40
  ? GuildScheduledEvents_1.GuildScheduledEvents.guildScheduledEventFromRaw(invite.guild_scheduled_event)
41
41
  : undefined,
42
42
  flags: invite.flags,
43
+ roles: invite.roles?.map((role) => Invites.partialRoleFromRaw(role))
43
44
  };
44
45
  }
45
46
  static inviteToRaw(invite) {
@@ -47,7 +48,7 @@ class Invites {
47
48
  type: invite.type,
48
49
  code: invite.code,
49
50
  guild: invite.guild !== undefined
50
- ? Guilds_1.Guilds.guildToRaw(invite.guild)
51
+ ? Guilds_1.Guilds.partialGuildToRaw(invite.guild)
51
52
  : undefined,
52
53
  channel: Channels_1.Channels.channelToRaw(invite.channel),
53
54
  inviter: invite.inviter !== undefined
@@ -75,6 +76,37 @@ class Invites {
75
76
  ? GuildScheduledEvents_1.GuildScheduledEvents.guildScheduledEventToRaw(invite.guildScheduledEvent)
76
77
  : undefined,
77
78
  flags: invite.flags,
79
+ roles: invite.roles?.map((role) => Invites.partialRoleToRaw(role))
80
+ };
81
+ }
82
+ static partialRoleFromRaw(role) {
83
+ return {
84
+ id: role.id,
85
+ name: role.name,
86
+ position: role.position,
87
+ color: role.color,
88
+ colors: {
89
+ primaryColor: role.colors.primary_color,
90
+ secondaryColor: role.colors.secondary_color,
91
+ tertiaryColor: role.colors.tertiary_color
92
+ },
93
+ icon: role.icon,
94
+ unicodeEmoji: role.unicode_emoji
95
+ };
96
+ }
97
+ static partialRoleToRaw(role) {
98
+ return {
99
+ id: role.id,
100
+ name: role.name,
101
+ position: role.position,
102
+ color: role.color,
103
+ colors: {
104
+ primary_color: role.colors.primaryColor,
105
+ secondary_color: role.colors.secondaryColor,
106
+ tertiary_color: role.colors.tertiaryColor
107
+ },
108
+ icon: role.icon,
109
+ unicode_emoji: role.unicodeEmoji
78
110
  };
79
111
  }
80
112
  }
@@ -298,6 +298,14 @@ class Messages {
298
298
  ? Polls_1.Polls.pollFromRaw(message.poll)
299
299
  : undefined,
300
300
  call: message.call,
301
+ sharedClientTheme: message.shared_client_theme !== undefined
302
+ ? {
303
+ colors: message.shared_client_theme.colors,
304
+ gradientAngle: message.shared_client_theme.gradient_angle,
305
+ baseMix: message.shared_client_theme.base_mix,
306
+ baseTheme: message.shared_client_theme.base_theme,
307
+ }
308
+ : undefined,
301
309
  };
302
310
  }
303
311
  static messageToRaw(message) {
@@ -404,6 +412,14 @@ class Messages {
404
412
  : undefined,
405
413
  poll: message.poll !== undefined ? Polls_1.Polls.pollToRaw(message.poll) : undefined,
406
414
  call: message.call,
415
+ shared_client_theme: message.sharedClientTheme !== undefined
416
+ ? {
417
+ colors: message.sharedClientTheme.colors,
418
+ gradient_angle: message.sharedClientTheme.gradientAngle,
419
+ base_mix: message.sharedClientTheme.baseMix,
420
+ base_theme: message.sharedClientTheme.baseTheme,
421
+ }
422
+ : undefined,
407
423
  };
408
424
  }
409
425
  }
@@ -1,5 +1,7 @@
1
- import type { Nameplate, RawNameplate, RawUser, User } from "../types/user";
1
+ import type { Collectibles, Nameplate, RawCollectibles, RawNameplate, RawUser, User } from "../types/user";
2
2
  export declare class Users {
3
+ static collectiblesFromRaw(collectibles: RawCollectibles): Collectibles;
4
+ static collectiblesToRaw(collectibles: Collectibles): RawCollectibles;
3
5
  static nameplateFromRaw(nameplate: RawNameplate): Nameplate;
4
6
  static nameplateToRaw(nameplate: Nameplate): RawNameplate;
5
7
  static userFromRaw(user: RawUser): User;
@@ -2,6 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Users = void 0;
4
4
  class Users {
5
+ static collectiblesFromRaw(collectibles) {
6
+ return {
7
+ nameplate: collectibles.nameplate !== undefined
8
+ ? this.nameplateFromRaw(collectibles.nameplate)
9
+ : undefined,
10
+ };
11
+ }
12
+ static collectiblesToRaw(collectibles) {
13
+ return {
14
+ nameplate: collectibles.nameplate !== undefined
15
+ ? this.nameplateToRaw(collectibles.nameplate)
16
+ : undefined,
17
+ };
18
+ }
5
19
  static nameplateFromRaw(nameplate) {
6
20
  return {
7
21
  skuId: nameplate.sku_id,
@@ -46,11 +60,7 @@ class Users {
46
60
  : undefined,
47
61
  collectibles: user.collectibles !== undefined
48
62
  ? user.collectibles !== null
49
- ? {
50
- nameplate: user.collectibles.nameplate !== undefined
51
- ? this.nameplateFromRaw(user.collectibles.nameplate)
52
- : undefined,
53
- }
63
+ ? this.collectiblesFromRaw(user.collectibles)
54
64
  : null
55
65
  : undefined,
56
66
  primaryGuild: user.primary_guild !== undefined
@@ -93,11 +103,7 @@ class Users {
93
103
  : undefined,
94
104
  collectibles: user.collectibles !== undefined
95
105
  ? user.collectibles !== null
96
- ? {
97
- nameplate: user.collectibles.nameplate !== undefined
98
- ? this.nameplateToRaw(user.collectibles.nameplate)
99
- : undefined,
100
- }
106
+ ? this.collectiblesToRaw(user.collectibles)
101
107
  : null
102
108
  : undefined,
103
109
  primary_guild: user.primaryGuild !== undefined
@@ -222,13 +222,13 @@ export interface RawLabel {
222
222
  id?: number;
223
223
  label: string;
224
224
  description?: string;
225
- component: RawTextInput | RawStringSelect | RawUserSelect | RawRoleSelect | RawMentionableSelect | RawChannelSelect | RawFileUpload;
225
+ component: RawTextInput | RawStringSelect | RawUserSelect | RawRoleSelect | RawMentionableSelect | RawChannelSelect | RawFileUpload | RawRadioGroup | RawCheckboxGroup | RawCheckbox;
226
226
  }
227
227
  /** https://discord.com/developers/docs/components/reference#label-label-interaction-response-structure */
228
228
  export interface RawLabelInteractionResponse {
229
229
  type: ComponentTypes.Label;
230
230
  id: number;
231
- component: RawTextInputInteractionResponse | RawStringSelectInteractionResponse | RawUserSelectInteractionResponse | RawRoleSelectInteractionResponse | RawMentionableSelectInteractionResponse | RawChannelSelectInteractionResponse | RawFileUploadInteractionResponse;
231
+ component: RawTextInputInteractionResponse | RawStringSelectInteractionResponse | RawUserSelectInteractionResponse | RawRoleSelectInteractionResponse | RawMentionableSelectInteractionResponse | RawChannelSelectInteractionResponse | RawFileUploadInteractionResponse | RawRadioGroupInteractionResponse | RawCheckboxGroupInteractionResponse | RawCheckboxInteractionResponse;
232
232
  }
233
233
  /** https://discord.com/developers/docs/components/reference#file-upload-file-upload-structure */
234
234
  export interface RawFileUpload {
@@ -255,6 +255,66 @@ export interface RawUnfurledMediaItem {
255
255
  content_type?: string;
256
256
  attachment_id?: snowflake;
257
257
  }
258
+ /** https://docs.discord.com/developers/components/reference#radio-group-structure */
259
+ export interface RawRadioGroup {
260
+ type: ComponentTypes.RadioGroup;
261
+ id?: number;
262
+ custom_id: string;
263
+ options: Array<RawRadioGroupOptions>;
264
+ required?: boolean;
265
+ }
266
+ /** https://docs.discord.com/developers/components/reference#radio-group-option-structure */
267
+ export interface RawRadioGroupOptions {
268
+ value: string;
269
+ label: string;
270
+ description?: string;
271
+ default?: boolean;
272
+ }
273
+ /** https://docs.discord.com/developers/components/reference#radio-group-interaction-response-structure */
274
+ export interface RawRadioGroupInteractionResponse {
275
+ type: ComponentTypes.RadioGroup;
276
+ id: number;
277
+ custom_id: string;
278
+ value: string | null;
279
+ }
280
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-structure */
281
+ export interface RawCheckboxGroup {
282
+ type: ComponentTypes.CheckboxGroup;
283
+ id?: number;
284
+ custom_id: string;
285
+ options: Array<RawCheckboxGroupOptions>;
286
+ min_values?: number;
287
+ max_values?: number;
288
+ required?: boolean;
289
+ }
290
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-option-structure */
291
+ export interface RawCheckboxGroupOptions {
292
+ value: string;
293
+ label: string;
294
+ description?: string;
295
+ default?: boolean;
296
+ }
297
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-interaction-response-structure */
298
+ export interface RawCheckboxGroupInteractionResponse {
299
+ type: ComponentTypes.CheckboxGroup;
300
+ id: number;
301
+ custom_id: string;
302
+ values: Array<string>;
303
+ }
304
+ /** https://docs.discord.com/developers/components/reference#checkbox-structure */
305
+ export interface RawCheckbox {
306
+ type: ComponentTypes.Checkbox;
307
+ id?: number;
308
+ custom_id: string;
309
+ default?: boolean;
310
+ }
311
+ /** https://docs.discord.com/developers/components/reference#checkbox-interaction-response-structure */
312
+ export interface RawCheckboxInteractionResponse {
313
+ type: ComponentTypes.Checkbox;
314
+ id: number;
315
+ custom_id: string;
316
+ value: boolean;
317
+ }
258
318
  /** https://discord.com/developers/docs/components/reference#action-row-action-row-structure */
259
319
  export interface ActionRow {
260
320
  type: ComponentTypes.ActionRow;
@@ -475,13 +535,13 @@ export interface Label {
475
535
  id?: number;
476
536
  label: string;
477
537
  description?: string;
478
- component: TextInput | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | FileUpload;
538
+ component: TextInput | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | FileUpload | RadioGroup | CheckboxGroup | Checkbox;
479
539
  }
480
540
  /** https://discord.com/developers/docs/components/reference#label-label-interaction-response-structure */
481
541
  export interface LabelInteractionResponse {
482
542
  type: ComponentTypes.Label;
483
543
  id: number;
484
- component: TextInputInteractionResponse | StringSelectInteractionResponse | UserSelectInteractionResponse | RoleSelectInteractionResponse | MentionableSelectInteractionResponse | ChannelSelectInteractionResponse | FileUploadInteractionResponse;
544
+ component: TextInputInteractionResponse | StringSelectInteractionResponse | UserSelectInteractionResponse | RoleSelectInteractionResponse | MentionableSelectInteractionResponse | ChannelSelectInteractionResponse | FileUploadInteractionResponse | RadioGroupInteractionResponse | CheckboxGroupInteractionResponse | CheckboxInteractionResponse;
485
545
  }
486
546
  /** https://discord.com/developers/docs/components/reference#file-upload-file-upload-structure */
487
547
  export interface FileUpload {
@@ -508,3 +568,63 @@ export interface UnfurledMediaItem {
508
568
  contentType?: string;
509
569
  attachmentId?: snowflake;
510
570
  }
571
+ /** https://docs.discord.com/developers/components/reference#radio-group-structure */
572
+ export interface RadioGroup {
573
+ type: ComponentTypes.RadioGroup;
574
+ id?: number;
575
+ customId: string;
576
+ options: Array<RadioGroupOptions>;
577
+ required?: boolean;
578
+ }
579
+ /** https://docs.discord.com/developers/components/reference#radio-group-option-structure */
580
+ export interface RadioGroupOptions {
581
+ value: string;
582
+ label: string;
583
+ description?: string;
584
+ default?: boolean;
585
+ }
586
+ /** https://docs.discord.com/developers/components/reference#radio-group-interaction-response-structure */
587
+ export interface RadioGroupInteractionResponse {
588
+ type: ComponentTypes.RadioGroup;
589
+ id: number;
590
+ customId: string;
591
+ value: string | null;
592
+ }
593
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-structure */
594
+ export interface CheckboxGroup {
595
+ type: ComponentTypes.CheckboxGroup;
596
+ id?: number;
597
+ customId: string;
598
+ options: Array<CheckboxGroupOptions>;
599
+ minValues?: number;
600
+ maxValues?: number;
601
+ required?: boolean;
602
+ }
603
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-option-structure */
604
+ export interface CheckboxGroupOptions {
605
+ value: string;
606
+ label: string;
607
+ description?: string;
608
+ default?: boolean;
609
+ }
610
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-interaction-response-structure */
611
+ export interface CheckboxGroupInteractionResponse {
612
+ type: ComponentTypes.CheckboxGroup;
613
+ id: number;
614
+ customId: string;
615
+ values: Array<string>;
616
+ }
617
+ /** https://docs.discord.com/developers/components/reference#checkbox-structure */
618
+ export interface Checkbox {
619
+ type: ComponentTypes.Checkbox;
620
+ id?: number;
621
+ customId: string;
622
+ default?: boolean;
623
+ }
624
+ /** https://docs.discord.com/developers/components/reference#checkbox-interaction-response-structure */
625
+ export interface CheckboxInteractionResponse {
626
+ type: ComponentTypes.Checkbox;
627
+ id: number;
628
+ customId: string;
629
+ value: boolean;
630
+ }