aboutsummaryrefslogtreecommitdiff
path: root/src/framework/create_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/framework/create_command.rs')
-rw-r--r--src/framework/create_command.rs28
1 files changed, 14 insertions, 14 deletions
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);