computercraft.command – ComputerCraft server command peripheral#

This device represents a command peripheral.

Available methods#

computercraft.command.getCommand()#

Get the command currently stored on the device.

Returns:

The current command.

Return type:

string

computercraft.command.setCommand(command)#

Replace the command currently stored on the device by the one provided.

Parameters:

command (string) – Command to store in the command module.

computercraft.command.runCommand()#

Run the command currently stored on the device.

Returns:

A boolean if the command completed successfully, or a failure message or nil otherwise.

Return type:

boolean | string | nil

Events#

This device does not raise events.