Table of Contents

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

CommandInfo

IsAborted

If the task was aborted before the timeout.

public bool IsAborted { get; }

Property Value

bool

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

bool

IsDisconnected

If the user disconnected before timeout.

public bool IsDisconnected { get; }

Property Value

bool

IsSuccessfullyExecuted

If the command actually ran successfully.

public bool IsSuccessfullyExecuted { get; }

Property Value

bool

IsTimedOut

If the command timed out.

public bool IsTimedOut { get; }

Property Value

bool

ResponseTime

Amount of time between when listening started and when the command finished.

public TimeSpan ResponseTime { get; }

Property Value

TimeSpan

User

The user that actually ran the command.

public ICommandUser? User { get; }

Property Value

ICommandUser

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

CommandContext

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()

Returns

CommandContext