Skip to content

Commit 8e894c7

Browse files
committed
discord: Add StringOption Min/MaxLength
1 parent 87c479a commit 8e894c7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

discord/command.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,8 @@ type StringOption struct {
447447
DescriptionLocalizations StringLocales `json:"description_localizations,omitempty"`
448448
Required bool `json:"required"`
449449
Choices []StringChoice `json:"choices,omitempty"`
450+
MinLength option.Int `json:"min_length,omitempty"`
451+
MaxLength option.Int `json:"max_length,omitempty"`
450452
// Autocomplete must not be true if Choices are present.
451453
Autocomplete bool `json:"autocomplete"`
452454
// LocalizedOptionName is only populated when this is received from
@@ -480,8 +482,8 @@ type IntegerOption struct {
480482
Description string `json:"description"`
481483
DescriptionLocalizations StringLocales `json:"description_localizations,omitempty"`
482484
Required bool `json:"required"`
483-
Min option.Int `json:"min_value,omitempty"`
484-
Max option.Int `json:"max_value,omitempty"`
485+
MinValue option.Int `json:"min_value,omitempty"`
486+
MaxValue option.Int `json:"max_value,omitempty"`
485487
Choices []IntegerChoice `json:"choices,omitempty"`
486488
// Autocomplete must not be true if Choices are present.
487489
Autocomplete bool `json:"autocomplete"`
@@ -627,8 +629,8 @@ type NumberOption struct {
627629
Description string `json:"description"`
628630
DescriptionLocalizations StringLocales `json:"description_localizations,omitempty"`
629631
Required bool `json:"required"`
630-
Min option.Float `json:"min_value,omitempty"`
631-
Max option.Float `json:"max_value,omitempty"`
632+
MinValue option.Float `json:"min_value,omitempty"`
633+
MaxValue option.Float `json:"max_value,omitempty"`
632634
Choices []NumberChoice `json:"choices,omitempty"`
633635
// Autocomplete must not be true if Choices are present.
634636
Autocomplete bool `json:"autocomplete"`

0 commit comments

Comments
 (0)