> For the complete documentation index, see [llms.txt](https://riseclients-organization.gitbook.io/rise-6-scripting-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://riseclients-organization.gitbook.io/rise-6-scripting-api/api-documentation/objects/command.md).

# Command

This page goes over about the Command object.

{% hint style="info" %}
This page goes over the methods of Command object. For more information, please visit [onExecute event page](/rise-6-scripting-api/api-documentation/events/onexecute-event.md).
{% endhint %}

### `unregister(): Undefined`

Unregisters the command.

### `getName(): String`

Returns the command name.

### `getDescription(): String`

Returns the command description.

### `handle(type, handler): Undefined`

<table><thead><tr><th width="125">Argument</th><th width="391">Type</th><th width="235">Description</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>String</code></td><td>The type of event to handle.</td></tr><tr><td><code>handler</code></td><td><code>function (args: String[]): Undefined</code></td><td>Callback function.</td></tr></tbody></table>

Adds a handler. The only supported callback for commands is `onExecute`.
