Table of Contents

Class MatchResult

Namespace
Discord.Commands
Assembly
Discord.Net.Commands.dll
public class MatchResult : IResult
Inheritance
MatchResult
Implements
Inherited Members

Properties

Error

Describes the error type that may have occurred during the operation.

public CommandError? Error { get; }

Property Value

CommandError?

A CommandError indicating the type of error that may have occurred during the operation; null if the operation was successful.

ErrorReason

Describes the reason for the error.

public string ErrorReason { get; }

Property Value

string

A string containing the error reason.

IsSuccess

Indicates whether the operation was successful or not.

public bool IsSuccess { get; }

Property Value

bool

true if the result is positive; otherwise false.

Match

Gets the command that may have matched during the command execution.

public CommandMatch? Match { get; }

Property Value

CommandMatch?

Pipeline

Gets on which pipeline stage the command may have matched or failed.

public IResult Pipeline { get; }

Property Value

IResult

Methods

FromError(CommandError, string)

public static MatchResult FromError(CommandError error, string reason)

Parameters

error CommandError
reason string

Returns

MatchResult

FromError(IResult)

public static MatchResult FromError(IResult result)

Parameters

result IResult

Returns

MatchResult

FromError(IResult, CommandError, string)

public static MatchResult FromError(IResult pipeline, CommandError error, string reason)

Parameters

pipeline IResult
error CommandError
reason string

Returns

MatchResult

FromError(Exception)

public static MatchResult FromError(Exception ex)

Parameters

ex Exception

Returns

MatchResult

FromSuccess(CommandMatch, IResult)

public static MatchResult FromSuccess(CommandMatch match, IResult pipeline)

Parameters

match CommandMatch
pipeline IResult

Returns

MatchResult

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.