yagpdb
yagpdb copied to clipboard
[WIP] Add min and max value for slash commands validation
This PR:
- Adds MinValue and MaxValue fields in ArgDef struct.
- Adds min and max value validations for slash commands.
You can also do that in place if needed:
type foo struct {
bar *float64
}
foobar := foo{func(in float64) *float64 { return &in }(10)}
But perhaps the generic approach is the best one indeed.
Maybe someday this will be a thing: https://github.com/golang/go/issues/45624