> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# CommandHandler

> Type alias exported by @botmesh/core.

```ts theme={null}
type CommandHandler = (ctx, args) => unknown | Promise<unknown>;
```

Defined in: [core/Bot.ts:110](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/Bot.ts#L110)

A slash-command handler — receives the context plus the parsed argument list.

## Parameters

| Parameter | Type |
| - | - |
| `ctx` | [`MessageContext`](https://botmesh.afaya.com.co/api/core/interfaces/MessageContext) |
| `args` | `string`\[] |

## Returns

`unknown` | `Promise`\<`unknown`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.