Table of Contents

Struct ParseResult

Namespace
Discord.Commands
Assembly
Discord.Net.Commands.dll

Contains information for the parsing result from the command service's parser.

public struct ParseResult : IResult
Implements
Inherited Members

Properties

ArgValues

public readonly IReadOnlyList<TypeReaderResult> ArgValues { get; }

Property Value

IReadOnlyList<TypeReaderResult>

Error

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

public readonly 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.

ErrorParameter

Provides information about the parameter that caused the parsing error.

public readonly ParameterInfo ErrorParameter { get; }

Property Value

ParameterInfo

A ParameterInfo indicating the parameter info of the error that may have occurred during parsing; null if the parsing was successful or the parsing error is not specific to a single parameter.

ErrorReason

Describes the reason for the error.

public readonly 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.

ParamValues

public readonly IReadOnlyList<TypeReaderResult> ParamValues { get; }

Property Value

IReadOnlyList<TypeReaderResult>

Methods

FromError(CommandError, string)

public static ParseResult FromError(CommandError error, string reason)

Parameters

error CommandError
reason string

Returns

ParseResult

FromError(CommandError, string, ParameterInfo)

public static ParseResult FromError(CommandError error, string reason, ParameterInfo parameterInfo)

Parameters

error CommandError
reason string
parameterInfo ParameterInfo

Returns

ParseResult

FromError(IResult)

public static ParseResult FromError(IResult result)

Parameters

result IResult

Returns

ParseResult

FromError(IResult, ParameterInfo)

public static ParseResult FromError(IResult result, ParameterInfo parameterInfo)

Parameters

result IResult
parameterInfo ParameterInfo

Returns

ParseResult

FromError(Exception)

public static ParseResult FromError(Exception ex)

Parameters

ex Exception

Returns

ParseResult

FromSuccess(IReadOnlyList<TypeReaderResult>, IReadOnlyList<TypeReaderResult>)

public static ParseResult FromSuccess(IReadOnlyList<TypeReaderResult> argValues, IReadOnlyList<TypeReaderResult> paramValues)

Parameters

argValues IReadOnlyList<TypeReaderResult>
paramValues IReadOnlyList<TypeReaderResult>

Returns

ParseResult

FromSuccess(IReadOnlyList<TypeReaderValue>, IReadOnlyList<TypeReaderValue>)

public static ParseResult FromSuccess(IReadOnlyList<TypeReaderValue> argValues, IReadOnlyList<TypeReaderValue> paramValues)

Parameters

argValues IReadOnlyList<TypeReaderValue>
paramValues IReadOnlyList<TypeReaderValue>

Returns

ParseResult

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.