@@ -218,6 +218,7 @@ var (
218
218
_ Component = (* UserSelectMenuComponent )(nil )
219
219
_ InteractiveComponent = (* UserSelectMenuComponent )(nil )
220
220
_ SelectMenuComponent = (* UserSelectMenuComponent )(nil )
221
+ _ LabelSubComponent = (* UserSelectMenuComponent )(nil )
221
222
)
222
223
223
224
// NewUserSelectMenu builds a new SelectMenuComponent from the provided values
@@ -235,6 +236,8 @@ type UserSelectMenuComponent struct {
235
236
DefaultValues []SelectMenuDefaultValue `json:"default_values,omitempty"`
236
237
MinValues * int `json:"min_values,omitempty"`
237
238
MaxValues int `json:"max_values,omitempty"`
239
+ // Required Indicates if the select menu is required to submit the Modal.
240
+ Required bool `json:"required"`
238
241
// Disabled whether the select menu is disabled (only supported in messages)
239
242
Disabled bool `json:"disabled"`
240
243
}
@@ -265,6 +268,7 @@ func (c UserSelectMenuComponent) GetCustomID() string {
265
268
func (UserSelectMenuComponent ) component () {}
266
269
func (UserSelectMenuComponent ) interactiveComponent () {}
267
270
func (UserSelectMenuComponent ) selectMenuComponent () {}
271
+ func (UserSelectMenuComponent ) labelSubComponent () {}
268
272
269
273
// WithCustomID returns a new UserSelectMenuComponent with the provided customID
270
274
func (c UserSelectMenuComponent ) WithCustomID (customID string ) UserSelectMenuComponent {
@@ -338,10 +342,17 @@ func (c UserSelectMenuComponent) WithID(id int) UserSelectMenuComponent {
338
342
return c
339
343
}
340
344
345
+ // WithRequired returns a new UserSelectMenuComponent with the provided required value
346
+ func (c UserSelectMenuComponent ) WithRequired (required bool ) UserSelectMenuComponent {
347
+ c .Required = required
348
+ return c
349
+ }
350
+
341
351
var (
342
- _ Component = (* UserSelectMenuComponent )(nil )
343
- _ InteractiveComponent = (* UserSelectMenuComponent )(nil )
344
- _ SelectMenuComponent = (* UserSelectMenuComponent )(nil )
352
+ _ Component = (* RoleSelectMenuComponent )(nil )
353
+ _ InteractiveComponent = (* RoleSelectMenuComponent )(nil )
354
+ _ SelectMenuComponent = (* RoleSelectMenuComponent )(nil )
355
+ _ LabelSubComponent = (* RoleSelectMenuComponent )(nil )
345
356
)
346
357
347
358
// NewRoleSelectMenu builds a new SelectMenuComponent from the provided values
@@ -359,6 +370,8 @@ type RoleSelectMenuComponent struct {
359
370
DefaultValues []SelectMenuDefaultValue `json:"default_values,omitempty"`
360
371
MinValues * int `json:"min_values,omitempty"`
361
372
MaxValues int `json:"max_values,omitempty"`
373
+ // Required Indicates if the select menu is required to submit the Modal.
374
+ Required bool `json:"required"`
362
375
// Disabled whether the select menu is disabled (only supported in messages)
363
376
Disabled bool `json:"disabled"`
364
377
}
@@ -389,6 +402,7 @@ func (c RoleSelectMenuComponent) GetCustomID() string {
389
402
func (RoleSelectMenuComponent ) component () {}
390
403
func (RoleSelectMenuComponent ) interactiveComponent () {}
391
404
func (RoleSelectMenuComponent ) selectMenuComponent () {}
405
+ func (RoleSelectMenuComponent ) labelSubComponent () {}
392
406
393
407
// WithCustomID returns a new RoleSelectMenuComponent with the provided customID
394
408
func (c RoleSelectMenuComponent ) WithCustomID (customID string ) RoleSelectMenuComponent {
@@ -462,10 +476,23 @@ func (c RoleSelectMenuComponent) WithID(id int) RoleSelectMenuComponent {
462
476
return c
463
477
}
464
478
479
+ // WithRequired returns a new RoleSelectMenuComponent with the provided required value
480
+ func (c RoleSelectMenuComponent ) WithRequired (required bool ) RoleSelectMenuComponent {
481
+ c .Required = required
482
+ return c
483
+ }
484
+
485
+ // WithID returns a new RoleSelectMenuComponent with the provided ID
486
+ func (c RoleSelectMenuComponent ) WithID (id int ) RoleSelectMenuComponent {
487
+ c .ID = id
488
+ return c
489
+ }
490
+
465
491
var (
466
492
_ Component = (* MentionableSelectMenuComponent )(nil )
467
493
_ InteractiveComponent = (* MentionableSelectMenuComponent )(nil )
468
494
_ SelectMenuComponent = (* MentionableSelectMenuComponent )(nil )
495
+ _ LabelSubComponent = (* MentionableSelectMenuComponent )(nil )
469
496
)
470
497
471
498
// NewMentionableSelectMenu builds a new SelectMenuComponent from the provided values
@@ -483,6 +510,8 @@ type MentionableSelectMenuComponent struct {
483
510
DefaultValues []SelectMenuDefaultValue `json:"default_values,omitempty"`
484
511
MinValues * int `json:"min_values,omitempty"`
485
512
MaxValues int `json:"max_values,omitempty"`
513
+ // Required Indicates if the select menu is required to submit the Modal.
514
+ Required bool `json:"required"`
486
515
// Disabled whether the select menu is disabled (only supported in messages)
487
516
Disabled bool `json:"disabled"`
488
517
}
@@ -513,6 +542,7 @@ func (c MentionableSelectMenuComponent) GetCustomID() string {
513
542
func (MentionableSelectMenuComponent ) component () {}
514
543
func (MentionableSelectMenuComponent ) interactiveComponent () {}
515
544
func (MentionableSelectMenuComponent ) selectMenuComponent () {}
545
+ func (MentionableSelectMenuComponent ) labelSubComponent () {}
516
546
517
547
// WithCustomID returns a new MentionableSelectMenuComponent with the provided customID
518
548
func (c MentionableSelectMenuComponent ) WithCustomID (customID string ) MentionableSelectMenuComponent {
@@ -583,10 +613,23 @@ func (c MentionableSelectMenuComponent) WithID(id int) MentionableSelectMenuComp
583
613
return c
584
614
}
585
615
616
+ // WithID returns a new MentionableSelectMenuComponent with the provided ID
617
+ func (c MentionableSelectMenuComponent ) WithID (id int ) MentionableSelectMenuComponent {
618
+ c .ID = id
619
+ return c
620
+ }
621
+
622
+ // WithRequired returns a new MentionableSelectMenuComponent with the provided required value
623
+ func (c MentionableSelectMenuComponent ) WithRequired (required bool ) MentionableSelectMenuComponent {
624
+ c .Required = required
625
+ return c
626
+ }
627
+
586
628
var (
587
629
_ Component = (* ChannelSelectMenuComponent )(nil )
588
630
_ InteractiveComponent = (* ChannelSelectMenuComponent )(nil )
589
631
_ SelectMenuComponent = (* ChannelSelectMenuComponent )(nil )
632
+ _ LabelSubComponent = (* ChannelSelectMenuComponent )(nil )
590
633
)
591
634
592
635
// NewChannelSelectMenu builds a new SelectMenuComponent from the provided values
@@ -605,6 +648,8 @@ type ChannelSelectMenuComponent struct {
605
648
MinValues * int `json:"min_values,omitempty"`
606
649
MaxValues int `json:"max_values,omitempty"`
607
650
ChannelTypes []ChannelType `json:"channel_types,omitempty"`
651
+ // Required Indicates if the select menu is required to submit the Modal.
652
+ Required bool `json:"required"`
608
653
// Disabled whether the select menu is disabled (only supported in messages)
609
654
Disabled bool `json:"disabled"`
610
655
}
@@ -635,6 +680,7 @@ func (c ChannelSelectMenuComponent) GetCustomID() string {
635
680
func (ChannelSelectMenuComponent ) component () {}
636
681
func (ChannelSelectMenuComponent ) interactiveComponent () {}
637
682
func (ChannelSelectMenuComponent ) selectMenuComponent () {}
683
+ func (ChannelSelectMenuComponent ) labelSubComponent () {}
638
684
639
685
// WithCustomID returns a new ChannelSelectMenuComponent with the provided customID
640
686
func (c ChannelSelectMenuComponent ) WithCustomID (customID string ) ChannelSelectMenuComponent {
@@ -714,6 +760,18 @@ func (c ChannelSelectMenuComponent) WithID(id int) ChannelSelectMenuComponent {
714
760
return c
715
761
}
716
762
763
+ // WithID returns a new ChannelSelectMenuComponent with the provided ID
764
+ func (c ChannelSelectMenuComponent ) WithID (id int ) ChannelSelectMenuComponent {
765
+ c .ID = id
766
+ return c
767
+ }
768
+
769
+ // WithRequired returns a new ChannelSelectMenuComponent with the provided required value
770
+ func (c ChannelSelectMenuComponent ) WithRequired (required bool ) ChannelSelectMenuComponent {
771
+ c .Required = required
772
+ return c
773
+ }
774
+
717
775
type SelectMenuDefaultValue struct {
718
776
Type SelectMenuDefaultValueType `json:"type"`
719
777
ID snowflake.ID `json:"id"`
0 commit comments