Skip to main content

ChatCommandContext

Provides context for an invoked chat command, including the originating message, parsed command name, and arguments.

public sealed class ChatCommandContext

Namespace: DeadworksManaged.Api
Source: Events/ChatCommandContext.cs#L4

Properties​

ChatCommandContext.Message​

The raw chat message that triggered this command.

Signature

public ChatMessage Message { get; }

Source: Events/ChatCommandContext.cs#L7

ChatCommandContext.Command​

The matched command string (e.g. "!mycommand").

Signature

public string Command { get; }

Source: Events/ChatCommandContext.cs#L10

ChatCommandContext.Args​

Arguments following the command, split on whitespace. A double-quoted run is a single argument with the quotes stripped.

Signature

public string[] Args { get; }

Source: Events/ChatCommandContext.cs#L13

ChatCommandContext.Prefix​

The prefix character that introduced this command ('/' or '!').

Signature

public char Prefix { get; }

Source: Events/ChatCommandContext.cs#L16

ChatCommandContext.Controller​

The player controller who sent the command, or null if unavailable.

Signature

public CCitadelPlayerController? Controller { get; }

Source: Events/ChatCommandContext.cs#L19