> ## 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:

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/sidebar.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=f671d3d4f64159d363439fbfdddd8b59" alt="sidebar" width="341" height="542" data-path="img/commands/sidebar.png" />

After click the Create button in the top right corner:

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/create.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=30b279806f8e864d843f0e36aa9d3b42" alt="create" width="998" height="139" data-path="img/commands/create.png" />

## Creating a Simple Command

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

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/cmdname.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=fed1c30733f9afdd72d8447d20180f50" alt="cmdname" width="810" height="109" data-path="img/commands/cmdname.png" />

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

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/response.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=747e69c54f6254fdf8527971b3f5f66c" alt="response" width="997" height="220" data-path="img/commands/response.png" />

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

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/save.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=ffbf877610e50375b4dc8679b79e9dd6" alt="save" width="1498" height="1218" data-path="img/commands/save.png" />

## Cooldowns

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

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/cooldown.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=1ec38735eb9944b89137fdd40a1108eb" alt="cooldown" width="988" height="205" data-path="img/commands/cooldown.png" />

### 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.

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/alias1.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=03747dc07db25baf89145d7f7e52d78e" alt="alias" width="477" height="125" data-path="img/commands/alias1.png" />

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.

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/alias2.gif?s=a964f9bd84e7013fc26d8ac3dadae9a0" alt="alias2" width="600" height="338" data-path="img/commands/alias2.gif" />

## 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:

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/saytype.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=80dfb9b8646bc2e13a9f3c75e319e4ee" alt="sayimg" width="303" height="73" data-path="img/commands/saytype.png" />

### Mention

Mention will Mention the user in the command response:

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/mentiontype.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=f413d83252a81595bd4e54c5e4620f46" alt="mentiontype" width="331" height="86" data-path="img/commands/mentiontype.png" />

### 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.

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/replytype1.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=8118e5d8251fc034ae9223fe65eed166" alt="replytype1" width="317" height="91" data-path="img/commands/replytype1.png" />

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/replytype2.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=3d86d31226ec6adccabb16205acb724d" alt="replytype2" width="318" height="97" data-path="img/commands/replytype2.png" />

### Whisper

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

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/whispertype1.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=d82ba2cc216f0c9c5b6d926ded6dc097" alt="whispertype1" width="331" height="97" data-path="img/commands/whispertype1.png" />

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/whispertype2.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=4b71288a8bbcf05a4ebf02d0e6df742d" alt="whispertype2" width="315" height="275" data-path="img/commands/whispertype2.png" />

## 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.

<Info>
  If no roles are selected, the command is triggerable by all users
</Info>

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/roles.gif?s=d84bd9c83720676ed939c2bfa90e59a5" alt="roles" width="600" height="338" data-path="img/commands/roles.gif" />

## Conditions

Conditions are options that affect how the command may work.

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/conditions.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=e06c8bcb216cc0f195f597273bb6a106" alt="conditions" width="488" height="388" data-path="img/commands/conditions.png" />

### 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.

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/expiry.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=3f407032e2d9ae1bce85a4d62d78be7e" alt="expiry" width="982" height="249" data-path="img/commands/expiry.png" />

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

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/enable.gif?s=efaced73e3b06d757f8c46021f5777a7" alt="enable" width="600" height="207" data-path="img/commands/enable.gif" />

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

<img src="https://mintcdn.com/fossadev/CPTmXSRcXIGlG-eS/img/commands/time.png?fit=max&auto=format&n=CPTmXSRcXIGlG-eS&q=85&s=32997371e79da6524fb092a20a6e318c" alt="time" width="502" height="113" data-path="img/commands/time.png" />


## Related topics

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


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