Class RuntimeResult
Represents the base class for creating command result containers.
Implements
Namespace: Discord.Interactions
Assembly: Discord.Net.Interactions.dll
Syntax
public abstract class RuntimeResult : object, IResult
Constructors
| Improve this Doc View SourceRuntimeResult(Nullable<InteractionCommandError>, String)
Initializes a new RuntimeResult class with the type of error and reason.
Declaration
protected RuntimeResult(InteractionCommandError? error, string reason)
Parameters
Type | Name | Description |
---|---|---|
Nullable<InteractionCommandError> | error | The type of failure, or null if none. |
String | reason | The reason of failure. |
Properties
| Improve this Doc View SourceError
Gets the error type that may have occurred during the operation.
Declaration
public InteractionCommandError? Error { get; }
Property Value
Type | Description |
---|---|
Nullable<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.
Declaration
public string ErrorReason { get; }
Property Value
Type | Description |
---|---|
String | A string containing the error reason. |
IsSuccess
Indicates whether the operation was successful or not.
Declaration
public bool IsSuccess { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the result is positive; otherwise false. |
Methods
| Improve this Doc View SourceToString()
Gets a string that indicates the runtime result.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
|