Struct ParseResult
- Namespace
- Discord.Interactions
- Assembly
- Discord.Net.Interactions.dll
public struct ParseResult : IResult
- Implements
- Inherited Members
Properties
Args
public readonly object[] Args { get; }
Property Value
- object[]
Error
Gets the error type that may have occurred during the operation.
public readonly InteractionCommandError? Error { get; }
Property Value
- InteractionCommandError?
A InteractionCommandError indicating the type of error that may have occurred during the operation; null if the operation was successful.
ErrorReason
Gets 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
Methods
FromError(IResult)
public static ParseResult FromError(IResult result)
Parameters
result
IResult
Returns
FromError(InteractionCommandError, string)
public static ParseResult FromError(InteractionCommandError error, string reason)
Parameters
error
InteractionCommandErrorreason
string
Returns
FromError(Exception)
public static ParseResult FromError(Exception exception)
Parameters
exception
Exception
Returns
FromSuccess(object[])
public static ParseResult FromSuccess(object[] args)
Parameters
args
object[]
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.