diff options
| author | Brayden Banks <[email protected]> | 2018-02-17 23:38:10 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2018-05-27 14:28:01 -0700 |
| commit | 5b8120ea33331a55ccc5bb743fbf7303b76b978f (patch) | |
| tree | 9c3ca7d683241c35b83bdd9cbf52d8a395e56031 /examples | |
| parent | Use `len_quoted()` for `min_args` and `max_args` (#282) (diff) | |
| download | serenity-5b8120ea33331a55ccc5bb743fbf7303b76b978f.tar.xz serenity-5b8120ea33331a55ccc5bb743fbf7303b76b978f.zip | |
Add `lacking_ownership` to `CreateHelpCommand`
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/05_command_framework/src/main.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/05_command_framework/src/main.rs b/examples/05_command_framework/src/main.rs index ca16f23..b588535 100644 --- a/examples/05_command_framework/src/main.rs +++ b/examples/05_command_framework/src/main.rs @@ -151,11 +151,14 @@ fn main() { .command_not_found_text("Could not find: `{}`.") // On another note, you can set up the help-menu-filter-behaviour. // Here are all possible settings shown on all possible options. - // First case is if a user lacks permissions for a command, we can hide the command. + // If a user lacks permissions for a command, we can `Hide` the command. .lacking_permissions(HelpBehaviour::Hide) - // If the user is nothing but lacking a certain role, we just display it hence our variant is `Nothing`. + // If a user lacks a certain role for a command, we can do `Nothing` to its listing + // and display it. .lacking_role(HelpBehaviour::Nothing) - // The last `enum`-variant is `Strike`, which ~~strikes~~ a command. + // If a user lacks bot ownership for an owners-only command, we can ~~`Strike`~~ it. + .lacking_ownership(HelpBehaviour::Strike) + // If a user is in the wrong channel for a command, we can ~~`Strike`~~ it. .wrong_channel(HelpBehaviour::Strike) // Serenity will automatically analyse and generate a hint/tip explaining the possible // cases of ~~strikethrough-commands~~, but only if |