Skip to content

ClientContext

Internal

Not re-exported through require(Operator). This is not part of the public API and may move in a minor release. It is documented because understanding it matters when you are debugging, not because you should construct one. The internal path is ServerStorage.Operator.Client.ClientContext.

The context a client command handler receives. Narrower than the server Context: members that are meaningless on a client are absent rather than present-and-nil, so a typo fails loudly.

Built for you by LocalDispatch; you never construct one.

Type

luau
type Context = {
	executor: Player,
	text: string,
	path: { string },
	flags: { [string]: any },
	reply: (self: Context, message: string) -> (),
	error: (self: Context, message: string) -> (),
}

Compared with the server context

MemberClientServer
executorthe local player, never nilPlayer?
text
path
flags
reply
error
jobIdabsent
confirmabsent
logActionabsent

jobId is absent because it is server-generated identity; read game.JobId directly if you want it.

logAction is absent because it writes the moderation log, and a client self-reporting a moderation action is exactly the unverifiable entry that log exists to keep out.

confirm is absent because :destructive() cannot be combined with :runClient(). A client cannot enforce a confirmation, and the same spelling must not carry two different guarantees. See why.

The context is frozen.

Released under the MIT Licence.