@@ -50,6 +50,8 @@ export interface ArgumentOptions {
50
50
*/
51
51
options ?: Array < Argument | ArgumentOptions > ;
52
52
channelTypes ?: Array < ChannelType | keyof typeof ChannelType > ;
53
+ minValue ?: number ;
54
+ maxValue ?: number ;
53
55
run ?: ( ctx : AutocompleteContext ) => any ;
54
56
}
55
57
@@ -82,6 +84,8 @@ const validationSchema = z
82
84
)
83
85
. array ( )
84
86
. optional ( ) ,
87
+ minValue : z . number ( ) . optional ( ) ,
88
+ maxValue : z . number ( ) . optional ( ) ,
85
89
run : z . function ( ) . optional ( ) ,
86
90
} )
87
91
. passthrough ( ) ;
@@ -99,6 +103,8 @@ export class Argument {
99
103
*/
100
104
public options ?: Array < Argument > ;
101
105
public channelTypes ?: Array < ChannelType | keyof typeof ChannelType > ;
106
+ public minValue ?: number ;
107
+ public maxValue ?: number ;
102
108
public run ?: ( ctx : AutocompleteContext ) => any ;
103
109
104
110
constructor ( options : ArgumentOptions ) {
@@ -123,6 +129,8 @@ export class Argument {
123
129
} ) ;
124
130
this . options = this . arguments ;
125
131
this . channelTypes = options . channelTypes ;
132
+ this . minValue = options . minValue ;
133
+ this . maxValue = options . maxValue ;
126
134
this . run = options . run ;
127
135
} )
128
136
. catch ( ( error ) => {
@@ -148,6 +156,8 @@ export class Argument {
148
156
required : this . required ,
149
157
choices : this . choices ,
150
158
channel_types : this . channelTypes ,
159
+ min_value : this . minValue ,
160
+ max_value : this . maxValue ,
151
161
autocomplete : typeof this . run === 'function' ,
152
162
} ;
153
163
}
0 commit comments