aboutsummaryrefslogtreecommitdiff
path: root/src/framework
diff options
context:
space:
mode:
Diffstat (limited to 'src/framework')
-rw-r--r--src/framework/standard/create_command.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/framework/standard/create_command.rs b/src/framework/standard/create_command.rs
index 0a467e1..4fe11f2 100644
--- a/src/framework/standard/create_command.rs
+++ b/src/framework/standard/create_command.rs
@@ -178,6 +178,14 @@ impl CreateCommand {
self
}
+ /// Exact number of arguments that should be passed.
+ pub fn num_args(mut self, num_args: i32) -> Self {
+ self.0.min_args = Some(num_args);
+ self.0.max_args = Some(num_args);
+
+ self
+ }
+
/// Whether command can be used only privately or not.
pub fn owners_only(mut self, owners_only: bool) -> Self {
self.0.owners_only = owners_only;