# SlashCommandInterface

#### SlashCommandInterface\<T = unknown> -> Interface

* **name**: string;

* **description**: string;

* **help**?: [CommandHelp](/afkhandler/commandhelp.md);

* **default**?: boolean;

* **type**?: [ApplicationCommandType](https://discord.js.org/#/docs/main/stable/typedef/ApplicationCommandType);

* **stop**?: boolean;

* **options**?: Array<[ApplicationCommandOptionData](https://discord.js.org/#/docs/main/stable/typedef/ApplicationCommandData)>;

* **cooldown**?: string | number;

* **cooldownMsg**?: (remaining: string) => [Awaited](/afkhandler/utils.md)\<unknown>;

* **callback**?: [SlashCallback](/afkhandler/callbacks.md)\<T>;&#x20;

* **run**?: [SlashCallback](/afkhandler/callbacks.md)\<T>;&#x20;

* **execute**?: [SlashCallback](/afkhandler/callbacks.md)\<T>;&#x20;

* **fire**?: [SlashCallback](/afkhandler/callbacks.md)\<T>;&#x20;

* **emit**?: [SlashCallback](/afkhandler/callbacks.md)\<T>;&#x20;

* **name**: command name;

* **description**: Command description for slash command;

* **help**: helping information;

* **callback**: function fired when a command is executed;&#x20;

* **run**: function fired when a command is executed;&#x20;

* **execute**: function fired when a command is executed;&#x20;

* **fire**: function fired when a command is executed;&#x20;

* **emit**: function fired when a command is executed;

* **default**: whether the command is enabled by default when the app is added to a guild;

* **type**: command type;

* **stop**: whether the handler will make a request to publish this command again;

* **options**: slash command options;

* **cooldown**: cooldown;

* **cooldownMsg**: message sent when a user is on cooldown (function where the 1st parameter is the remaining time, returned value is what will be sent);


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://away-from-keyboard.gitbook.io/afkhandler/slashcommandinterface.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
