SwiftlyS2

ICommandContext

Interface ICommandContext

Namespace: SwiftlyS2.Shared.Commands

Assembly: SwiftlyS2.CS2.dll

public interface ICommandContext

Properties

Args

Gets the array of arguments passed with the command.

string[] Args { get; }
Property Value

CommandName

Gets the command name itself.

string CommandName { get; }
Property Value

IsSentByPlayer

Gets a value indicating whether the command was sent by a player.

bool IsSentByPlayer { get; }
Property Value

IsSlient

Gets a value indicating whether the command should be executed silently without broadcasting to other players.

bool IsSlient { get; }
Property Value

Prefix

Gets the command prefix.

string Prefix { get; }
Property Value

Sender

Gets the player who sent the command, or null if the command was not sent by a player.

IPlayer? Sender { get; }
Property Value

Methods

Reply(string)

Sends a reply message to the command sender.

void Reply(string message)
Parameters
  • message string — The message to send as a reply.

ReplyAsync(string)

Sends a reply message to the command sender asynchronously.

Task ReplyAsync(string message)
Parameters
  • message string — The message to send as a reply.
Returns

On this page