From 36ed2b49f06f5f2736bf6b0937f4d002e2bb52ef Mon Sep 17 00:00:00 2001 From: Joe4evr Date: Fri, 23 Jun 2017 20:46:59 +0200 Subject: [PATCH] PreconditionGroup quick fix It didn't make much sense --- src/Discord.Net.Commands/Info/CommandInfo.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Discord.Net.Commands/Info/CommandInfo.cs b/src/Discord.Net.Commands/Info/CommandInfo.cs index ae350e592..f187460d5 100644 --- a/src/Discord.Net.Commands/Info/CommandInfo.cs +++ b/src/Discord.Net.Commands/Info/CommandInfo.cs @@ -68,7 +68,7 @@ namespace Discord.Commands { services = services ?? EmptyServiceProvider.Instance; - async Task CheckGroups(IEnumerable preconditions, string type) + async Task CheckGroups(IEnumerable preconditions, string type) { foreach (IGrouping preconditionGroup in preconditions.GroupBy(p => p.Group, StringComparer.Ordinal)) { @@ -78,7 +78,7 @@ namespace Discord.Commands { var result = await precondition.CheckPermissions(context, this, services).ConfigureAwait(false); if (!result.IsSuccess) - return PreconditionGroupResult.FromError($"{type} default precondition group failed.", new[] { result }); + return result; } } else @@ -243,4 +243,4 @@ namespace Discord.Commands return $"\"{Name}\" for {context.User} in {context.Channel}"; } } -} \ No newline at end of file +}