Skip to main content

CommandContext

Represents an individual command execution, encapsulating state, arguments, and routing across the client-server boundary.

Properties

Dispatcher

This item is read only and cannot be modified. Read Only
CommandContext.Dispatcher: Dispatcher

The dispatcher instance that created this command context.

Cmdr

This item is read only and cannot be modified. Read Only
CommandContext.Cmdr: Cmdr | CmdrClient

A direct reference to Cmdr. This may either be the server or client version depending on where the command is running.

Name

This item is read only and cannot be modified. Read Only
CommandContext.Name: string

The primary name of the command being executed (not its alias).

RawText

This item is read only and cannot be modified. Read Only
CommandContext.RawText: string

The complete, unparsed raw text sequence used to trigger this command.

Object

This item is read only and cannot be modified. Read Only
CommandContext.Object: CommandDefinition

The complete underlying static command definition layout configuration.

Group

This item is read only and cannot be modified. Read Only
CommandContext.Group: any

The group category assigned to this command, typically a string.

State

CommandContext.State: table

A blank dictionary useful for carrying user-defined execution state across hooks or internal pipeline filters.

Aliases

This item is read only and cannot be modified. Read Only
CommandContext.Aliases: {string}

An array of secondary matching aliases capable of evoking this command.

Alias

This item is read only and cannot be modified. Read Only
CommandContext.Alias: string

The specific identifier string utilized by the user to invoke this execution context.

Description

This item is read only and cannot be modified. Read Only
CommandContext.Description: string

The display description explaining what the command does.

Executor

This item is read only and cannot be modified. Read Only
CommandContext.Executor: Player

The native Roblox Player instance that executed this command text string.

ArgumentDefinitions

This item is read only and cannot be modified. Read Only
CommandContext.ArgumentDefinitions: {ArgumentDefinition}

The structural argument schema arrays inherited from the command definition layout.

RawArguments

This item is read only and cannot be modified. Read Only
CommandContext.RawArguments: {string}

An array of split string inputs mapped before evaluation and validation phases occur.

Arguments

This item is read only and cannot be modified. Read Only
CommandContext.Arguments: {ArgumentContext}

An array matching internal parsed ArgumentContext values tied sequentially to inputs.

Data

CommandContext.Data: any

Special contextual data object fetched client-side and routed down into server pipelines.

Response

This item is read only and cannot be modified. Read Only
CommandContext.Response: string?

The returned execution or error feedback output string context generated by run parameters.

Guards

This item is read only and cannot be modified. Read Only
CommandContext.Guards: {(CommandContext) → string?}

A table of guarding interception hooks capable of short-circuiting runtime sequences.

Functions

GetLastArgument

CommandContext:GetLastArgument() → ArgumentContext?

Scans contextual entries in reverse to locate the last argument containing text. Mainly useful for updating current autocompletion layouts.

Run

CommandContext:Run() → string?--

The final logged text response result.

Triggers execution pipelines for hooks, layout guards, and boundary evaluation modules.

GetArgument

CommandContext:GetArgument(
indexnumber--

The positional index of the argument.

) → ArgumentContext?

Returns the ArgumentContext object for the given index.

GetData

CommandContext:GetData() → any

Returns the custom gathered data payload mapped by client-side definition closures.

SendEvent

CommandContext:SendEvent(
playerPlayer,--

Target user instance.

eventstring,--

The unique identifier string name of the network event.

...any--

Extensible arguments passed alongside the payload.

) → ()

Dispatches a named network event targeting a specific player (on the server), or processes a local handler event sequence directly (on the client).

BroadcastEvent

CommandContext:BroadcastEvent(
eventstring,--

The registration name of the network event.

...any--

Dynamic arguments bundled within the packet.

) → ()

Broadcasts a custom network event message sequentially targeting all connected clients.

Reply

CommandContext:Reply(
textstring,--

The output line text statement to print.

options(Color3 | {
ColorColor3?,
RichTextboolean?
})?--

Optional coloring configurations or a settings dictionary containing Color and RichText formatting flags.

) → ()

Prints text inside the invoking executor's console UI frame window. Useful for streaming verbose text output lines over progressive asynchronous jobs.

GetStore

CommandContext:GetStore(
namestring--

Identifiable keyword reference mapping out the store.

) → table

Queries persistent global data storage structures registered under a tracking name.

HasImplementation

CommandContext:HasImplementation() → boolean

Returns true if the core executable logic of this context has a runnable implementation on the machine currently handling evaluations.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a unique operational command context tracking record.",
            "params": [
                {
                    "name": "options",
                    "desc": "Parameters mapping layout specifications to state fields.",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "CommandContext"
                }
            ],
            "function_type": "static",
            "private": true,
            "source": {
                "line": 139,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Parse",
            "desc": "Parses unparsed raw text segments into structural `ArgumentContext` blocks.",
            "params": [
                {
                    "name": "allowIncompleteArguments",
                    "desc": "If true, suppresses missing parameter exceptions during multi-step updates.",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [
                {
                    "desc": "Returns true if arguments successfully constructed.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "Error description if validation breaks structural order conventions.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 174,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Validate",
            "desc": "Validates every argument against its structural type constraints. Must be successfully processed prior to executing `:Run()`.",
            "params": [
                {
                    "name": "isFinal",
                    "desc": "Indicates whether the user has fully committed the line by hitting Enter.",
                    "lua_type": "boolean"
                }
            ],
            "returns": [
                {
                    "desc": "True if all argument checks pass layout requirements.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "Concatenated validation failure messages.",
                    "lua_type": "string"
                }
            ],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 212,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "GetLastArgument",
            "desc": "Scans contextual entries in reverse to locate the last argument containing text. Mainly useful for updating current autocompletion layouts.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ArgumentContext?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 235,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "GatherArgumentValues",
            "desc": "Gathers fully resolved evaluation values across every registered parameter.",
            "params": [],
            "returns": [
                {
                    "desc": "An array containing parsed native values or fallback defaults.",
                    "lua_type": "{any}"
                },
                {
                    "desc": "Total number of expected parameter arguments.",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 251,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Run",
            "desc": "Triggers execution pipelines for hooks, layout guards, and boundary evaluation modules.",
            "params": [],
            "returns": [
                {
                    "desc": "The final logged text response result.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 272,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "GetArgument",
            "desc": "Returns the `ArgumentContext` object for the given index.",
            "params": [
                {
                    "name": "index",
                    "desc": "The positional index of the argument.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ArgumentContext?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 331,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "GetData",
            "desc": "Returns the custom gathered data payload mapped by client-side definition closures.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 343,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "SendEvent",
            "desc": "Dispatches a named network event targeting a specific player (on the server), or processes a local handler event sequence directly (on the client).",
            "params": [
                {
                    "name": "player",
                    "desc": "Target user instance.",
                    "lua_type": "Player"
                },
                {
                    "name": "event",
                    "desc": "The unique identifier string name of the network event.",
                    "lua_type": "string"
                },
                {
                    "name": "...",
                    "desc": "Extensible arguments passed alongside the payload.",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 363,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "BroadcastEvent",
            "desc": "Broadcasts a custom network event message sequentially targeting all connected clients.",
            "params": [
                {
                    "name": "event",
                    "desc": "The registration name of the network event.",
                    "lua_type": "string"
                },
                {
                    "name": "...",
                    "desc": "Dynamic arguments bundled within the packet.",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 385,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Reply",
            "desc": "Prints text inside the invoking executor's console UI frame window. Useful for streaming verbose text output lines over progressive asynchronous jobs.",
            "params": [
                {
                    "name": "text",
                    "desc": "The output line text statement to print.",
                    "lua_type": "string"
                },
                {
                    "name": "options",
                    "desc": "Optional coloring configurations or a settings dictionary containing `Color` and `RichText` formatting flags.",
                    "lua_type": "(Color3 | { Color: Color3?, RichText: boolean? })?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 400,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "GetStore",
            "desc": "Queries persistent global data storage structures registered under a tracking name.",
            "params": [
                {
                    "name": "name",
                    "desc": "Identifiable keyword reference mapping out the store.",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 411,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "HasImplementation",
            "desc": "Returns true if the core executable logic of this context has a runnable implementation on the machine currently handling evaluations.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 421,
                "path": "Cmdr/Shared/Command.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "Dispatcher",
            "desc": "The dispatcher instance that created this command context.",
            "lua_type": "Dispatcher",
            "readonly": true,
            "source": {
                "line": 21,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Cmdr",
            "desc": "A direct reference to Cmdr. This may either be the server or client version depending on where the command is running.",
            "lua_type": "Cmdr | CmdrClient",
            "readonly": true,
            "source": {
                "line": 28,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Name",
            "desc": "The primary name of the command being executed (not its alias).",
            "lua_type": "string",
            "readonly": true,
            "source": {
                "line": 35,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "RawText",
            "desc": "The complete, unparsed raw text sequence used to trigger this command.",
            "lua_type": "string",
            "readonly": true,
            "source": {
                "line": 42,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Object",
            "desc": "The complete underlying static command definition layout configuration.",
            "lua_type": "CommandDefinition",
            "readonly": true,
            "source": {
                "line": 49,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Group",
            "desc": "The group category assigned to this command, typically a string.",
            "lua_type": "any",
            "readonly": true,
            "source": {
                "line": 56,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "State",
            "desc": "A blank dictionary useful for carrying user-defined execution state across hooks or internal pipeline filters.",
            "lua_type": "table",
            "source": {
                "line": 62,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Aliases",
            "desc": "An array of secondary matching aliases capable of evoking this command.",
            "lua_type": "{string}",
            "readonly": true,
            "source": {
                "line": 69,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Alias",
            "desc": "The specific identifier string utilized by the user to invoke this execution context.",
            "lua_type": "string",
            "readonly": true,
            "source": {
                "line": 76,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Description",
            "desc": "The display description explaining what the command does.",
            "lua_type": "string",
            "readonly": true,
            "source": {
                "line": 83,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Executor",
            "desc": "The native Roblox `Player` instance that executed this command text string.",
            "lua_type": "Player",
            "readonly": true,
            "source": {
                "line": 90,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "ArgumentDefinitions",
            "desc": "The structural argument schema arrays inherited from the command definition layout.",
            "lua_type": "{ArgumentDefinition}",
            "readonly": true,
            "source": {
                "line": 97,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "RawArguments",
            "desc": "An array of split string inputs mapped before evaluation and validation phases occur.",
            "lua_type": "{string}",
            "readonly": true,
            "source": {
                "line": 104,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Arguments",
            "desc": "An array matching internal parsed `ArgumentContext` values tied sequentially to inputs.",
            "lua_type": "{ArgumentContext}",
            "readonly": true,
            "source": {
                "line": 111,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Data",
            "desc": "Special contextual data object fetched client-side and routed down into server pipelines.",
            "lua_type": "any",
            "source": {
                "line": 117,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Response",
            "desc": "The returned execution or error feedback output string context generated by run parameters.",
            "lua_type": "string?",
            "readonly": true,
            "source": {
                "line": 124,
                "path": "Cmdr/Shared/Command.luau"
            }
        },
        {
            "name": "Guards",
            "desc": "A table of guarding interception hooks capable of short-circuiting runtime sequences.",
            "lua_type": "{ (CommandContext) -> string? }",
            "readonly": true,
            "source": {
                "line": 131,
                "path": "Cmdr/Shared/Command.luau"
            }
        }
    ],
    "types": [],
    "name": "CommandContext",
    "desc": "Represents an individual command execution, encapsulating state, arguments, and routing across the client-server boundary.",
    "source": {
        "line": 11,
        "path": "Cmdr/Shared/Command.luau"
    }
}