> For the complete documentation index, see [llms.txt](https://discord-base.gitbook.io/discord-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://discord-base.gitbook.io/discord-base/datatypes/commands.md).

# Commands

Defined in index, you can import them from it.

## `Command`

| property name | type annotation                                                                                      |
| ------------- | ---------------------------------------------------------------------------------------------------- |
| data          | [SlashCommandBuilder](https://discord.js.org/docs/packages/builders/1.8.2/SlashCommandBuilder:Class) |
| callback      | callback (below)                                                                                     |
| cooldown      | number                                                                                               |
| used          | date                                                                                                 |
| options       | [CommandOptions](#commandoptions)                                                                    |

```typescript
callback: (client: Client, interaction: any, options: CallbackOptions) => Promise<void>;
```

## `CallbackOptions`

| property name | type annotation                                                                                      |
| ------------- | ---------------------------------------------------------------------------------------------------- |
| data          | [SlashCommandBuilder](https://discord.js.org/docs/packages/builders/1.8.2/SlashCommandBuilder:Class) |
| cooldown      | number                                                                                               |
| used          | date                                                                                                 |
| options       | [CommandOptions](#commandoptions)                                                                    |

Has an alias called **CommandOptions** defined in **engine**. Can be imported from engine instead of index

## `CommandOptions`

{% hint style="info" %}
Defined in index, you can import it from it
{% endhint %}

```typescript
import { CommandOptions } from "index"
```

```typescript
export type CommandOptions = {
	command: {
		guild: string[];
	};
};
```
