permission commands should now work for global expressions too

This commit is contained in:
Kwoth
2022-06-16 03:59:32 +02:00
parent a826f4245f
commit 91e4d9dffc

View File

@@ -48,7 +48,7 @@ public sealed class CommandOrCrTypeReader : NadekoTypeReader<CommandOrCrInfo>
{ {
input = input.ToUpperInvariant(); input = input.ToUpperInvariant();
if (_exprs.ExpressionExists(ctx.Guild?.Id, input)) if (_exprs.ExpressionExists(ctx.Guild?.Id, input) || _exprs.ExpressionExists(null, input))
return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input, CommandOrCrInfo.Type.Custom)); return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input, CommandOrCrInfo.Type.Custom));
var cmd = await new CommandTypeReader(_commandHandler, _cmds).ReadAsync(ctx, input); var cmd = await new CommandTypeReader(_commandHandler, _cmds).ReadAsync(ctx, input);