Skip to main content

Variable: Robo

const Robo: object;

Robo is the main entry point for your bot. It provides a simple API for starting, stopping, and restarting your Robo.

import { Robo } from 'robo.js'

Robo.start()

You do not normally need to use this API directly, as the CLI will handle starting and stopping for you.

Learn more: Robo

Type declaration

build()

build: (options?) => Promise<void>;

Builds your Robo instance. Similar to running robo build from the CLI.

Parameters

ParameterTypeDescription
options?BuildCommandOptionsOptions for building your Robo instance, similar to CLI options

Returns

Promise<void>

A promise that resolves when Robo has finished building

restart()

restart: () => Promise<void>;

Restarts your Robo instance gracefully. Similar to making changes with robo dev and restarting.

Returns

Promise<void>

A promise that resolves when Robo has restarted

start()

start: (options?) => Promise<void>;

Starts your Robo instance. Similar to running robo start from the CLI.

Parameters

ParameterTypeDescription
options?StartOptionsOptions for starting your Robo instance

Returns

Promise<void>

A promise that resolves when Robo has started

stop()

stop: (exitCode) => Promise<void>;

Stops your Robo instance gracefully. Similar to pressing Ctrl+C in the terminal.

Parameters

ParameterTypeDefault valueDescription
exitCodenumber0The exit code to use when stopping Robo

Returns

Promise<void>

Robo.js Logo

MIT © 2024 Robo.js By WavePlay