aboutsummaryrefslogtreecommitdiff
path: root/src/framework
diff options
context:
space:
mode:
authorLakelezz <[email protected]>2018-06-18 20:58:40 +0200
committerLakelezz <[email protected]>2018-06-18 20:58:40 +0200
commitaeb89af4eff59bb3ea9eb7623685bf7ad7520496 (patch)
treee55423f13c79c388cb2cb6581b40a2f09030c092 /src/framework
parentRename from `is_command_hidden` to `is_command_visible`. (diff)
downloadserenity-aeb89af4eff59bb3ea9eb7623685bf7ad7520496.tar.xz
serenity-aeb89af4eff59bb3ea9eb7623685bf7ad7520496.zip
If no help is available, command is not visible thus return false.
Diffstat (limited to 'src/framework')
-rw-r--r--src/framework/standard/help_commands.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/framework/standard/help_commands.rs b/src/framework/standard/help_commands.rs
index 92d801b..c01325e 100644
--- a/src/framework/standard/help_commands.rs
+++ b/src/framework/standard/help_commands.rs
@@ -116,8 +116,6 @@ pub fn is_command_visible(command_options: &Arc<CommandOptions>, msg: &Message,
} else {
return help_options.lacking_permissions != HelpBehaviour::Hide;
}
- } else {
- return help_options.lacking_permissions != HelpBehaviour::Hide;
}
}
}
@@ -125,7 +123,7 @@ pub fn is_command_visible(command_options: &Arc<CommandOptions>, msg: &Message,
return help_options.wrong_channel != HelpBehaviour::Hide;
}
- return false;
+ return false
}
/// Posts an embed showing each individual command group and its commands.