1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-12-01 03:03:48 +00:00

discord: Fix incorrect Min/Max fields in command.go

This commit is contained in:
diamondburned 2021-12-02 13:21:47 -08:00
parent 172d448e74
commit 07a2c407e0
No known key found for this signature in database
GPG key ID: D78C4471CE776659

View file

@ -388,6 +388,8 @@ type IntegerOption struct {
OptionName string `json:"name"`
Description string `json:"description"`
Required bool `json:"required"`
Min option.Int `json:"min_value,omitempty"`
Max option.Int `json:"max_value,omitempty"`
Choices []IntegerChoice `json:"choices,omitempty"`
}
@ -402,8 +404,6 @@ func (i *IntegerOption) _val() {}
type IntegerChoice struct {
Name string `json:"name"`
Value int `json:"value"`
Min option.Int `json:"min_value,omitempty"`
Max option.Int `json:"max_value,omitempty"`
}
// BooleanOption is a subcommand option that fits into a CommandOptionValue.
@ -482,6 +482,8 @@ type NumberOption struct {
OptionName string `json:"name"`
Description string `json:"description"`
Required bool `json:"required"`
Min option.Float `json:"min_value,omitempty"`
Max option.Float `json:"max_value,omitempty"`
Choices []NumberChoice `json:"choices,omitempty"`
}
@ -496,8 +498,6 @@ func (n *NumberOption) _val() {}
type NumberChoice struct {
Name string `json:"name"`
Value float64 `json:"value"`
Min option.Float `json:"min_value,omitempty"`
Max option.Float `json:"max_value,omitempty"`
}
// NewCommand creates a new command.