Class PreconditionGroupResult
- Namespace
- Discord.Interactions
- Assembly
- Discord.Net.Interactions.dll
Represents a result type for grouped command preconditions.
public class PreconditionGroupResult : PreconditionResult, IResult
- Inheritance
-
PreconditionGroupResult
- Implements
- Inherited Members
Properties
Results
Gets the results of the preconditions of this group.
public IReadOnlyCollection<PreconditionResult> Results { get; }
Property Value
Methods
FromError(IResult)
Returns a PreconditionGroupResult with the specified result type.
public static PreconditionGroupResult FromError(IResult result)
Parameters
resultIResultThe result of failure.
Returns
FromError(Exception)
Returns a PreconditionGroupResult with Exception and the Message.
public static PreconditionGroupResult FromError(Exception exception)
Parameters
exceptionExceptionThe exception that caused the precondition check to fail.
Returns
FromError(string, IEnumerable<PreconditionResult>)
Returns a PreconditionGroupResult with UnmetPrecondition and the specified reason.
public static PreconditionGroupResult FromError(string reason, IEnumerable<PreconditionResult> results)
Parameters
reasonstringThe reason of failure.
resultsIEnumerable<PreconditionResult>Precondition results of this group
Returns
FromSuccess()
Returns a PreconditionGroupResult with no errors.
public static PreconditionGroupResult FromSuccess()