diff options
| author | Mishio595 <[email protected]> | 2018-11-13 22:23:39 -0700 |
|---|---|---|
| committer | Mishio595 <[email protected]> | 2018-11-13 22:23:39 -0700 |
| commit | 1dad6996d8e9c983dc9e1689a93dbef5b0696c22 (patch) | |
| tree | 1ee7226178cae76b20e6adcdc7e7cfcc3c477c32 /src/framework/standard/create_command.rs | |
| parent | Finish rebase (diff) | |
| parent | Make `Region`s `Japan`-variant lowercase. (diff) | |
| download | serenity-1dad6996d8e9c983dc9e1689a93dbef5b0696c22.tar.xz serenity-1dad6996d8e9c983dc9e1689a93dbef5b0696c22.zip | |
Merge branch 'upstream'
Diffstat (limited to 'src/framework/standard/create_command.rs')
| -rw-r--r-- | src/framework/standard/create_command.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/framework/standard/create_command.rs b/src/framework/standard/create_command.rs index a769d4c..3976f6d 100644 --- a/src/framework/standard/create_command.rs +++ b/src/framework/standard/create_command.rs @@ -168,6 +168,14 @@ impl CreateCommand { self } + /// Whether owners shall bypass buckets, missing permissions, + /// wrong channels, missing roles, and checks. + pub fn owner_privileges(mut self, owner_privileges: bool) -> Self { + self.0.owner_privileges = owner_privileges; + + self + } + /// Whether command should be displayed in help list or not, used by other commands. pub fn help_available(mut self, help_available: bool) -> Self { self.0.help_available = help_available; @@ -189,7 +197,7 @@ impl CreateCommand { self } - /// Minumum amount of arguments that should be passed. + /// Minimum amount of arguments that should be passed. pub fn min_args(mut self, min_args: i32) -> Self { self.0.min_args = Some(min_args); @@ -236,7 +244,7 @@ impl CreateCommand { /// Sets an initialise middleware to be called upon the command's actual registration. /// - /// This is similiar to implementing the `init` function on `Command`. + /// This is similar to implementing the `init` function on `Command`. pub fn init<F: Fn() + Send + Sync + 'static>(mut self, f: F) -> Self { self.2.init = Some(Arc::new(f)); @@ -245,7 +253,7 @@ impl CreateCommand { /// Sets a before middleware to be called before the command's execution. /// - /// This is similiar to implementing the `before` function on `Command`. + /// This is similar to implementing the `before` function on `Command`. pub fn before<F: Send + Sync + 'static>(mut self, f: F) -> Self where F: Fn(&mut Context, &Message) -> bool { self.2.before = Some(Arc::new(f)); @@ -255,7 +263,7 @@ impl CreateCommand { /// Sets an after middleware to be called after the command's execution. /// - /// This is similiar to implementing the `after` function on `Command`. + /// This is similar to implementing the `after` function on `Command`. pub fn after<F: Send + Sync + 'static>(mut self, f: F) -> Self where F: Fn(&mut Context, &Message, &Result<(), CommandError>) { self.2.after = Some(Arc::new(f)); |