diff options
| author | Lakelezz <[email protected]> | 2018-10-15 20:47:54 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-10-15 20:47:54 +0200 |
| commit | c5285ae1824dd26adbbd2f0b876eed607f64baa1 (patch) | |
| tree | f8cda5d383274d5b238291eef2c8faea0854a2a9 /src/framework/standard/command.rs | |
| parent | Add configuration for the write lock the cache is using to update (#415) (diff) | |
| download | serenity-c5285ae1824dd26adbbd2f0b876eed607f64baa1.tar.xz serenity-c5285ae1824dd26adbbd2f0b876eed607f64baa1.zip | |
Add Option to disable bypassing Checks for Owners (#419)
Diffstat (limited to 'src/framework/standard/command.rs')
| -rw-r--r-- | src/framework/standard/command.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/framework/standard/command.rs b/src/framework/standard/command.rs index 6f4440f..3a787ae 100644 --- a/src/framework/standard/command.rs +++ b/src/framework/standard/command.rs @@ -99,6 +99,7 @@ pub struct CommandGroup { pub help_available: bool, pub dm_only: bool, pub guild_only: bool, + pub owner_privileges: bool, pub owners_only: bool, pub help: Option<Arc<Help>>, /// A set of checks to be called prior to executing the command-group. The checks @@ -117,6 +118,7 @@ impl Default for CommandGroup { required_permissions: Permissions::empty(), dm_only: false, guild_only: false, + owner_privileges: true, help_available: true, owners_only: false, allowed_roles: Vec::new(), @@ -155,6 +157,8 @@ pub struct CommandOptions { pub dm_only: bool, /// Whether command can be used only in guilds or not. pub guild_only: bool, + /// Whether the command treats owners as normal users. + pub owner_privileges: bool, /// Whether command can only be used by owners or not. pub owners_only: bool, /// Other names that can be used to call this command instead. @@ -335,6 +339,7 @@ impl Default for CommandOptions { required_permissions: Permissions::empty(), dm_only: false, guild_only: false, + owner_privileges: true, help_available: true, owners_only: false, allowed_roles: Vec::new(), |