feat(ApplicationCommandOption): min and max length (#1208)

Implement min_length and max_length for string option type.
This commit is contained in:
Fedor Lapshin 2022-07-15 00:40:21 +03:00 committed by GitHub
parent 4e021d9140
commit 0feaae8f1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,6 +118,10 @@ type ApplicationCommandOption struct {
MinValue *float64 `json:"min_value,omitempty"`
// Maximum value of number/integer option.
MaxValue float64 `json:"max_value,omitempty"`
// Minimum length of string option.
MinLength *int `json:"min_length,omitempty"`
// Maximum length of string option.
MaxLength int `json:"max_length,omitempty"`
}
// ApplicationCommandOptionChoice represents a slash command option choice.