diff options
| author | Lakelezz <[email protected]> | 2017-09-05 15:16:05 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2017-09-05 15:16:05 +0200 |
| commit | d925f926c0f9f5b8010a998570441258417fc89a (patch) | |
| tree | 3496f5f6f8ef0310a91ed90a8366e0ecb555181e /src/framework/standard/command.rs | |
| parent | match to map/? (diff) | |
| download | serenity-d925f926c0f9f5b8010a998570441258417fc89a.tar.xz serenity-d925f926c0f9f5b8010a998570441258417fc89a.zip | |
Allow commands to be limited to certain roles (#157)
Diffstat (limited to 'src/framework/standard/command.rs')
| -rw-r--r-- | src/framework/standard/command.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/framework/standard/command.rs b/src/framework/standard/command.rs index 22a82ce..e869bf5 100644 --- a/src/framework/standard/command.rs +++ b/src/framework/standard/command.rs @@ -57,6 +57,8 @@ pub struct Command { pub max_args: Option<i32>, /// Permissions required to use this command. pub required_permissions: Permissions, + /// Roles allowed to use this command. + pub allowed_roles: Vec<String>, /// Whether command should be displayed in help list or not, used by other commands. pub help_available: bool, /// Whether command can be used only privately or not. @@ -86,6 +88,7 @@ impl Command { max_args: None, owners_only: false, required_permissions: Permissions::empty(), + allowed_roles: Vec::new(), } } } |