Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

writeCommand

writeCommand<Handle>(step, bot, writeCommandOptions): number

Sends a command for bot, a bot player, from the room, with the room’s step or any authority over its world: admitted at the start of the next tick, as a page’s command that arrives between two ticks is, through the same checks and the same rate. Returns its request id, which findCommandResult reads the result by once the reader settles it. A test sends a player’s command the same way.

Type Parameter
Handle extends AnyCommandHandle
Parameter Type
step Authority
bot Entity
writeCommandOptions WriteCommandOptions<Handle>

number