Skip to content

Commit

Permalink
Port Do not display command if no help_available from v0.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
arqunis committed May 15, 2019
1 parent 0618894 commit 0e3fe5f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/framework/standard/help_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,10 @@ fn fill_eligible_commands<'a>(
let options = &command.options;
let name = &options.names[0];

if !options.help_available {
continue;
}

if options.only_in == OnlyIn::None
|| options.only_in == OnlyIn::Dm && msg.is_private()
|| options.only_in == OnlyIn::Guild && !msg.is_private()
Expand All @@ -532,7 +536,7 @@ fn fill_eligible_commands<'a>(
continue;
}

if options.help_available && has_correct_permissions(&context.cache, &options, msg) {
if has_correct_permissions(&context.cache, &options, msg) {
if let Some(guild) = msg.guild(&context.cache) {
let guild = guild.read();

Expand Down

0 comments on commit 0e3fe5f

Please sign in to comment.