diff --git a/src/Discord.Net.Commands/Attributes/PreconditionAttribute.cs b/src/Discord.Net.Commands/Attributes/PreconditionAttribute.cs index 38672f071..943bddb89 100644 --- a/src/Discord.Net.Commands/Attributes/PreconditionAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/PreconditionAttribute.cs @@ -7,12 +7,9 @@ namespace Discord.Commands public abstract class PreconditionAttribute : Attribute { /// - /// Specify a group that this precondition belongs to. - /// Preconditions of the same group require only one - /// of the preconditions to pass in order to be - /// successful (A || B). Specifying = 0 - /// or not at all will require *all* preconditions - /// to pass, just like normal (A && B). + /// Specify a group that this precondition belongs to. Preconditions of the same group require only one + /// of the preconditions to pass in order to be successful (A || B). Specifying = 0 + /// or not at all will require *all* preconditions to pass, just like normal (A && B). /// public int Group { get; set; } = 0; diff --git a/src/Discord.Net.Commands/Info/CommandInfo.cs b/src/Discord.Net.Commands/Info/CommandInfo.cs index c052629e6..61357675b 100644 --- a/src/Discord.Net.Commands/Info/CommandInfo.cs +++ b/src/Discord.Net.Commands/Info/CommandInfo.cs @@ -86,7 +86,7 @@ namespace Discord.Commands results.Add(await precondition.CheckPermissions(context, this, services).ConfigureAwait(false)); if (!results.Any(p => p.IsSuccess)) - return results[0]; + return PreconditionResult.FromError($"Module precondition group {preconditionGroup.Key} failed: {String.Join("\n", results.Select(r => r.ErrorReason))}."); } } @@ -108,7 +108,7 @@ namespace Discord.Commands results.Add(await precondition.CheckPermissions(context, this, services).ConfigureAwait(false)); if (!results.Any(p => p.IsSuccess)) - return results[0]; + return PreconditionResult.FromError($"Command precondition group {preconditionGroup.Key} failed: {String.Join("\n", results.Select(r => r.ErrorReason))}."); } }