diff options
| author | Lakelezz <[email protected]> | 2018-06-18 20:26:16 +0200 |
|---|---|---|
| committer | Lakelezz <[email protected]> | 2018-06-18 20:26:16 +0200 |
| commit | 6e1edde4a3fe27d0d90db7ea906ca5f115a2d5fb (patch) | |
| tree | 5539351788e1608235e49637c40fdb2533b52448 /src | |
| parent | Check if a command would be visible, if yes provide help for it. (diff) | |
| download | serenity-6e1edde4a3fe27d0d90db7ea906ca5f115a2d5fb.tar.xz serenity-6e1edde4a3fe27d0d90db7ea906ca5f115a2d5fb.zip | |
Rename from `is_command_hidden` to `is_command_visible`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/framework/standard/help_commands.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/framework/standard/help_commands.rs b/src/framework/standard/help_commands.rs index bf52e90..92d801b 100644 --- a/src/framework/standard/help_commands.rs +++ b/src/framework/standard/help_commands.rs @@ -94,7 +94,7 @@ pub fn has_all_requirements(cmd: &Arc<CommandOptions>, msg: &Message) -> bool { /// **Note**: A command is visible when it is either normally displayed or /// strikethrough upon requested help by a user. #[cfg(feature = "cache")] -pub fn is_command_hidden(command_options: &Arc<CommandOptions>, msg: &Message, help_options: &HelpOptions) -> bool { +pub fn is_command_visible(command_options: &Arc<CommandOptions>, msg: &Message, help_options: &HelpOptions) -> bool { if !command_options.dm_only && !command_options.guild_only || command_options.dm_only && msg.is_private() || command_options.guild_only && !msg.is_private() { @@ -170,7 +170,7 @@ pub fn with_embeds<H: BuildHasher>( if name == with_prefix || name == *command_name { match *command { CommandOrAlias::Command(ref cmd) => { - if is_command_hidden(&cmd.options(), msg, help_options) { + if is_command_visible(&cmd.options(), msg, help_options) { found = Some((command_name, cmd)); } else { break; @@ -181,7 +181,7 @@ pub fn with_embeds<H: BuildHasher>( match *actual_command { CommandOrAlias::Command(ref cmd) => { - if is_command_hidden(&cmd.options(), msg, help_options) { + if is_command_visible(&cmd.options(), msg, help_options) { found = Some((name, cmd)); } else { break; @@ -419,7 +419,7 @@ pub fn plain<H: BuildHasher>( if name == with_prefix || name == *command_name { match *command { CommandOrAlias::Command(ref cmd) => { - if is_command_hidden(&cmd.options(), msg, help_options) { + if is_command_visible(&cmd.options(), msg, help_options) { found = Some((command_name, cmd)); } else { @@ -431,7 +431,7 @@ pub fn plain<H: BuildHasher>( match *actual_command { CommandOrAlias::Command(ref cmd) => { - if is_command_hidden(&cmd.options(), msg, help_options) { + if is_command_visible(&cmd.options(), msg, help_options) { found = Some((name, cmd)); } else { |