> For the complete documentation index, see [llms.txt](https://away-from-keyboard.gitbook.io/afkhandler/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://away-from-keyboard.gitbook.io/afkhandler/commandinterface.md). Agents can also search and read this documentation through its [MCP server](https://away-from-keyboard.gitbook.io/afkhandler/~gitbook/mcp).

# CommandInterface

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

* **name**: string;

* **aliases**?: string\[];&#x20;

* **help**?: [CommandHelp](https://away-from-keyboard.gitbook.io/afkhandler/commandhelp.md);&#x20;

* **hidden**?: boolean | null;

* **guilds**?: [Arrayed](https://away-from-keyboard.gitbook.io/afkhandler/utils.md)<[Snowflake](https://discord.js.org/#/docs/main/stable/typedef/Snowflake)>;&#x20;

* **guildsMsg**?: [DJSSend](https://away-from-keyboard.gitbook.io/afkhandler/utils.md);

* **nsfw**?: boolean;&#x20;

* **nsfwMsg**?: [DJSSend](https://away-from-keyboard.gitbook.io/afkhandler/utils.md);

* **dev**?: boolean;&#x20;

* **devMsg**?**:** [DJSSend](https://away-from-keyboard.gitbook.io/afkhandler/utils.md);

* **permissions**?: [Arrayed](https://away-from-keyboard.gitbook.io/afkhandler/utils.md)<[Snowflake](https://discord.js.org/#/docs/main/stable/typedef/Snowflake)>;&#x20;

* **permissionsMsg**?: [DJSSend](https://away-from-keyboard.gitbook.io/afkhandler/utils.md);

* **locked**?: boolean;&#x20;

* **lockedMsg**?: [DJSSend](https://away-from-keyboard.gitbook.io/afkhandler/utils.md);

* **cooldown**?: string | number;&#x20;

* **cooldownMsg**?: (remaining?: string) => [Awaited](https://away-from-keyboard.gitbook.io/afkhandler/utils.md)<[DJSSend](https://away-from-keyboard.gitbook.io/afkhandler/utils.md)>;

* **args**?: { **max**?: number; **min**?: number; };

* **argsMsg**?: [DJSSend](https://away-from-keyboard.gitbook.io/afkhandler/utils.md);

* **botPermissions**: [Arrayed](https://away-from-keyboard.gitbook.io/afkhandler/utils.md)<[Snowflake](https://discord.js.org/#/docs/main/stable/typedef/Snowflake)>;

* **botPermissionsMsg**: [DJSSend](https://away-from-keyboard.gitbook.io/afkhandler/utils.md);

* **callback**?: Callback\<T>;&#x20;

* **run**?: Callback\<T>;&#x20;

* **execute**?: Callback\<T>;&#x20;

* **fire**?: Callback\<T>;&#x20;

* **emit**?: Callback\<T>;&#x20;

* **name**: command name;

* **aliases**: command aliases;&#x20;

* **help**: helping information;&#x20;

* **hidden**: when true it makes the command completely invisible, when null it makes the command partially invisible;

* **guilds**: guilds where the command can be executed;&#x20;

* **guildsMsg**: message sent when a command isn't executed in the correct guild;

* **nsfw**: nsfw command;&#x20;

* **nsfwMsg**: message that appears when a command is nsfw and is executed in q non nsfw channel;

* **dev**: developer command;&#x20;

* **devMsg:** message sent when a developer command isn't used by a developer;

* **permissions**: permissions that a GuildMember requires to execute the command;&#x20;

* **permissionsMsg**: message sent when a member without any permission setted on permissions property;

* **locked**: if the command is currently locked;&#x20;

* **lockedMsg**: message sent when a locked command is executed;

* **cooldown**: cooldown;&#x20;

* **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);

* **args.min:** minimum arguments&#x20;

* **args.max**: maximum arguments

* **argsMsg**: message sent when the user message doesn't satisfy the given arguments;

* **botPermissions**: permissions that the bot requires to execute a command;

* **botPermissionsMsg**: message sent when the bot doesn't have every permission specified in botPermissions property;

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

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

* **execute**: function fired when a command is executed

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

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