From 75749ac3f894a2a41b54287a7e7c9114152c99e4 Mon Sep 17 00:00:00 2001 From: Zeyla Hellyer Date: Wed, 24 May 2017 07:44:46 -0700 Subject: Re-order methods/fields in the framework This will help with readability in the generated documentation. --- src/framework/create_command.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/framework/create_command.rs') diff --git a/src/framework/create_command.rs b/src/framework/create_command.rs index 512e82c..a31c91a 100644 --- a/src/framework/create_command.rs +++ b/src/framework/create_command.rs @@ -9,20 +9,6 @@ use ::model::{Message, Permissions}; pub struct CreateCommand(pub Command); impl CreateCommand { - /// Adds a ratelimit bucket. - pub fn bucket(mut self, bucket: &str) -> Self { - self.0.bucket = Some(bucket.to_owned()); - - self - } - - /// Adds an alias, allowing users to use the command under a different name. - pub fn known_as(mut self, name: &str) -> Self { - self.0.aliases.push(name.to_owned()); - - self - } - /// Adds multiple aliases. pub fn batch_known_as(mut self, names: Vec<&str>) -> Self { for n in names { @@ -32,6 +18,13 @@ impl CreateCommand { self } + /// Adds a ratelimit bucket. + pub fn bucket(mut self, bucket: &str) -> Self { + self.0.bucket = Some(bucket.to_owned()); + + self + } + /// Adds a "check" to a command, which checks whether or not the command's /// function should be called. /// @@ -149,6 +142,13 @@ impl CreateCommand { self } + /// Adds an alias, allowing users to use the command under a different name. + pub fn known_as(mut self, name: &str) -> Self { + self.0.aliases.push(name.to_owned()); + + self + } + /// Maximum amount of arguments that can be passed. pub fn max_args(mut self, max_args: i32) -> Self { self.0.max_args = Some(max_args); -- cgit v1.2.3