# setCommands

> **setCommands**(`commands`): `RegisteredCommand`[]

Defined in: [sdk/js/src/api.ts:166](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/api.ts#L166)

Replaces the bot's commands at run time (the ones from `bot.command` register at start).

## Parameters

### commands

[`CommandLike`](/docs/reference/js/zaun-bot/interfaces/commandlike/)[]

## Returns

`RegisteredCommand`[]
