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

# Creating Commands

Custom commands give users the ability to create a command with their desired response.

To create a custom command, navigate to the Commands tab on the sidebar:

![sidebar](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/sidebar.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=f671d3d4f64159d363439fbfdddd8b59)

After click the Create button in the top right corner:

![create](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/create.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=30b279806f8e864d843f0e36aa9d3b42)

## Creating a Simple Command

Start by adding the command name. This is the command that will be used in chat:

![cmdname](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/cmdname.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=fed1c30733f9afdd72d8447d20180f50)

Response is what you would like to be sent to chat. This can include normal text but also utilize variables:

![response](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/response.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=747e69c54f6254fdf8527971b3f5f66c)

When your command is finished, click the Save button in the button right corner:

![save](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/save.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=ffbf877610e50375b4dc8679b79e9dd6)

## Cooldowns

Cooldowns are essential to controlling how often a command is used and to avoid spam in chat.

![cooldown](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/cooldown.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=1ec38735eb9944b89137fdd40a1108eb)

### Global Cooldowns

Global cooldowns are the minimum frequency a command can be triggered by any user in chat.

If a single user triggers a command, the **entire** chat must wait until the cooldown is over until this command can be triggered again.

### User Cooldowns

User Cooldowns are the minimum frequency a single user trigger a command.

If User-A triggers a command they must wait X amount of seconds before they can trigger the command again. User-B can still trigger the command.

## Aliases

A command alias is used to add another command name without creating a new custom command.

![alias](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/alias1.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=03747dc07db25baf89145d7f7e52d78e)

Create an alias by typing in the box and using the Enter key on your keyboard or the Create button. Click the X on the alias to delete it.

![alias2](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/alias2.gif?s=a964f9bd84e7013fc26d8ac3dadae9a0)

## Response Type

Response type defines how Fossabot answers commands.

Fossabot has 4 response types, Say, Mention, Reply, and Whisper.

### Say

Say will print the command response normally in chat:

![sayimg](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/saytype.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=80dfb9b8646bc2e13a9f3c75e319e4ee)

### Mention

Mention will Mention the user in the command response:

![mentiontype](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/mentiontype.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=f413d83252a81595bd4e54c5e4620f46)

### Reply

Reply uses [Twitch's chat reply feature](https://help.twitch.tv/s/article/chat-basics?language=en_US#replies) to send the command response.

![replytype1](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/replytype1.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=8118e5d8251fc034ae9223fe65eed166)

![replytype2](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/replytype2.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=3d86d31226ec6adccabb16205acb724d)

### Whisper

Whisper will send the user a direct message with the command response.

![whispertype1](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/whispertype1.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=d82ba2cc216f0c9c5b6d926ded6dc097)

![whispertype2](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/whispertype2.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=4b71288a8bbcf05a4ebf02d0e6df742d)

## Roles

Roles allow you to set who can trigger a command. Select one or more role from the dropdown menu that will be able to trigger a command.

> [!NOTE]
>
> If no roles are selected, the command is triggerable by all users

![roles](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/roles.gif?s=d84bd9c83720676ed939c2bfa90e59a5)

## Conditions

Conditions are options that affect how the command may work.

![conditions](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/conditions.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=e06c8bcb216cc0f195f597273bb6a106)

### Enabled when stream offline

This toggle changes if this command is triggerable while the stream is offline.

### Enabled when stream online

This toggle changes if this command is triggerable while the stream is online.

### Hidden in directory

Removes command from public command list. Command is still triggerable in chat.

### Whisper during cooldowns

If the command is on cooldown, The user will be whispered with the response.

## Expiry

Expiry disables or deletes a command after a specific time or a selected time and date. Expiry is disabled by default.

![expiry](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/expiry.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=3f407032e2d9ae1bce85a4d62d78be7e)

To enable Expiry, first choose if the command should be disabled or deleted.

![enable](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/enable.gif?s=efaced73e3b06d757f8c46021f5777a7)

When using relative time, set the number of seconds until the timer expires. Otherwise set the expire time with a date and time.

![time](https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/time.png?fit=max\&auto=format\&n=CPTmXSRcXIGlG-eS\&q=85\&s=32997371e79da6524fb092a20a6e318c)


## Related topics

- [!commands](https://fossabot.com/docs/commands/default/commands.md)
- [Default Commands](https://fossabot.com/docs/commands/default/index.md)
- [Creating a Lookalike](https://fossabot.com/docs/lookalikes/creating-lookalikes.md)
- [!addcmd](https://fossabot.com/docs/commands/default/addcmd.md)
- [!cmd](https://fossabot.com/docs/commands/default/cmd.md)


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