Skip to main content

ChatCommandAttribute

Namespace: DeadworksManaged.Api

Marks a plugin method as a handler for a chat command (e.g. "!mycommand"). Can be applied multiple times to map multiple commands to the same method.

Constructors

MethodDescription
ChatCommandAttribute(string command)command: The command string to match, including any prefix character.

Properties

PropertyDescription
CommandThe chat command string this attribute matches, including the prefix (e.g. "!mycommand").

ChatCommandContext

Namespace: DeadworksManaged.Api

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

Properties

PropertyDescription
MessageThe raw chat message that triggered this command.
CommandThe matched command string (e.g. "!mycommand").
ArgsArguments following the command, split by whitespace.
ControllerThe player controller who sent the command, or null if unavailable.

ChatMessage

Namespace: DeadworksManaged.Api

Incoming chat message from a player. Passed to ChatMessage).