From 6e1edde4a3fe27d0d90db7ea906ca5f115a2d5fb Mon Sep 17 00:00:00 2001 From: Lakelezz <12222135+Lakelezz@users.noreply.github.com> Date: Mon, 18 Jun 2018 20:26:16 +0200 Subject: Rename from `is_command_hidden` to `is_command_visible`. --- src/framework/standard/help_commands.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/framework') 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, 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, msg: &Message, help_options: &HelpOptions) -> bool { +pub fn is_command_visible(command_options: &Arc, 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( 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( 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( 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( 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 { -- cgit v1.2.3