diff --git a/discord/command.go b/discord/command.go index c2de315..388efb4 100644 --- a/discord/command.go +++ b/discord/command.go @@ -363,11 +363,12 @@ type CommandOptionValue interface { // StringOption is a subcommand option that fits into a CommandOptionValue. type StringOption struct { - OptionName string `json:"name"` - Description string `json:"description"` - Required bool `json:"required"` - Choices []StringChoice `json:"choices,omitempty"` - Autocomplete bool `json:"autocomplete"` + OptionName string `json:"name"` + Description string `json:"description"` + Required bool `json:"required"` + Choices []StringChoice `json:"choices,omitempty"` + // Autocomplete must not be true if Choices are present. + Autocomplete bool `json:"autocomplete"` } // Name implements CommandOption. @@ -391,6 +392,8 @@ type IntegerOption struct { Min option.Int `json:"min_value,omitempty"` Max option.Int `json:"max_value,omitempty"` Choices []IntegerChoice `json:"choices,omitempty"` + // Autocomplete must not be true if Choices are present. + Autocomplete bool `json:"autocomplete"` } // Name implements CommandOption. @@ -485,6 +488,8 @@ type NumberOption struct { Min option.Float `json:"min_value,omitempty"` Max option.Float `json:"max_value,omitempty"` Choices []NumberChoice `json:"choices,omitempty"` + // Autocomplete must not be true if Choices are present. + Autocomplete bool `json:"autocomplete"` } // Name implements CommandOption.