Table of Contents

Struct SearchResult

Namespace
Discord.Commands
Assembly
Discord.Net.Commands.dll
public struct SearchResult : IResult
Implements
Inherited Members

Properties

Commands

public readonly IReadOnlyList<CommandMatch> Commands { get; }

Property Value

IReadOnlyList<CommandMatch>

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.

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.

Text

public readonly string Text { get; }

Property Value

string

Methods

FromError(CommandError, string)

public static SearchResult FromError(CommandError error, string reason)

Parameters

error CommandError
reason string

Returns

SearchResult

FromError(IResult)

public static SearchResult FromError(IResult result)

Parameters

result IResult

Returns

SearchResult

FromError(Exception)

public static SearchResult FromError(Exception ex)

Parameters

ex Exception

Returns

SearchResult

FromSuccess(string, IReadOnlyList<CommandMatch>)

public static SearchResult FromSuccess(string text, IReadOnlyList<CommandMatch> commands)

Parameters

text string
commands IReadOnlyList<CommandMatch>

Returns

SearchResult

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.