Skip to content

Commit ef70e65

Browse files
Properly hide subcommands from help that the user lacks perms for
1 parent 39ef1d3 commit ef70e65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Commands/GlobalCmds.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ await ctx.RespondAsync(
142142
List<Command> eligibleCommands = [];
143143
foreach (Command? candidateCommand in commandsToSearch)
144144
{
145-
var executionChecks = candidateCommand.Attributes.Where(x => x is ContextCheckAttribute) as List<ContextCheckAttribute>;
145+
var executionChecks = candidateCommand.Attributes.Where(x => x is ContextCheckAttribute);
146146

147147
if (executionChecks == null || !executionChecks.Any())
148148
{

0 commit comments

Comments
 (0)