Class MatchResult
Assembly: Discord.Net.Commands.dll​
View Source​
Declaration
public class MatchResult : IResult
Properties​
Match​
Gets the command that may have matched during the command execution.
View Source​
Declaration
public CommandMatch? Match { get; }
Pipeline​
Gets on which pipeline stage the command may have matched or failed.
View Source​
Declaration
public IResult Pipeline { get; }
Error​
Describes the error type that may have occurred during the operation.
View Source​
Declaration
public CommandError? Error { get; }
ErrorReason​
Describes the reason for the error.
View Source​
Declaration
public string ErrorReason { get; }
IsSuccess​
Indicates whether the operation was successful or not.
View Source​
Declaration
public bool IsSuccess { get; }
Methods​
FromSuccess(CommandMatch, IResult)​
View Source​
Declaration
public static MatchResult FromSuccess(CommandMatch match, IResult pipeline)
Returns​
Parameters​
Type | Name |
---|---|
Discord.Commands.CommandMatch | match |
Discord.Commands.IResult | pipeline |
FromError(CommandError, String)​
View Source​
Declaration
public static MatchResult FromError(CommandError error, string reason)
Returns​
Parameters​
Type | Name |
---|---|
Discord.Commands.CommandError | error |
System.String | reason |
FromError(Exception)​
View Source​
Declaration
public static MatchResult FromError(Exception ex)
Returns​
Parameters​
Type | Name |
---|---|
System.Exception | ex |
FromError(IResult)​
View Source​
Declaration
public static MatchResult FromError(IResult result)
Returns​
Parameters​
Type | Name |
---|---|
Discord.Commands.IResult | result |
FromError(IResult, CommandError, String)​
View Source​
Declaration
public static MatchResult FromError(IResult pipeline, CommandError error, string reason)
Returns​
Parameters​
Type | Name |
---|---|
Discord.Commands.IResult | pipeline |
Discord.Commands.CommandError | error |
System.String | reason |
ToString()​
View Source​
Declaration
public override string ToString()
Returns​
System.String