Struct CommandWaitResult
- Namespace
- Uncreated.Warfare.Interaction.Commands
- Assembly
- Uncreated.Warfare.dll
public readonly struct CommandWaitResult
- Inherited Members
Properties
Command
The command that was executed.
public CommandInfo Command { get; }
Property Value
IsAborted
If the task was aborted before the timeout.
public bool IsAborted { get; }
Property Value
Remarks
Always true if IsCancelled is true.
IsCancelled
If the task was cancelled using a CancellationToken before the timeout.
public bool IsCancelled { get; }
Property Value
IsDisconnected
If the user disconnected before timeout.
public bool IsDisconnected { get; }
Property Value
IsSuccessfullyExecuted
If the command actually ran successfully.
public bool IsSuccessfullyExecuted { get; }
Property Value
IsTimedOut
If the command timed out.
public bool IsTimedOut { get; }
Property Value
ResponseTime
Amount of time between when listening started and when the command finished.
public TimeSpan ResponseTime { get; }
Property Value
User
The user that actually ran the command.
public ICommandUser? User { get; }
Property Value
Remarks
This will be null if the command execution didn't happen because of a timeout, disconnect, etc.
Methods
GetExecutionContext()
Get the context of the executed command.
public CommandContext GetExecutionContext()
Returns
Exceptions
- InvalidOperationException
Command timed out or otherwise wasn't fully executed.
GetExecutionContextOrNull()
Get the context of the executed command or null if it didn't fully execute.
public CommandContext? GetExecutionContextOrNull()