# Creating simple chat command

Video tutorial is available:

{% embed url="<https://youtu.be/hzsV037QbQE>" %}

Start by creating a new automation. Select **Chat Command** as trigger.

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FgizsDcfrzO0blGzrARSq%2FScreenshot%202024-04-06%20at%2017.24.20.png?alt=media&#x26;token=36ff0966-1dab-4589-99b3-621d467848ce" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FLtk3tYIY5gbkaMeXNMnC%2FScreenshot%202024-04-06%20at%2017.25.15.png?alt=media&#x26;token=d1f1eebb-2369-4abf-b2bb-e2a9863ae10d" alt="" width="375"><figcaption></figcaption></figure>

* Optionally select your Guild / Server (if you don't select it, the command will be available to all guilds that contain your bot). Please note that if you don't select a guild, the command could take up to an hour to become available to everyone (that is due to the way Discord synchronizes commands)
* Enter name of the command (this is what you will be using in Discord when you type **/command-name**)
* Enter a **Description** (this is shown in Discord when selecting the command)
* Select **Permissions** that will be required to use the command (the command is available to everyone if no permissions are selected). You can also limit access to only Administrators and later assign roles to the command (you can only do this from within Server Settings in Discord - go to Server settings -> Integrations -> Bot name -> Commands)

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FmNpqnhLJZ2wQxKL7s6g4%2FScreenshot%202024-04-06%20at%2017.30.44.png?alt=media&#x26;token=ddf8e4ca-36c2-4836-bfb6-8ceb17d402fe" alt="" width="375"><figcaption></figcaption></figure>

Now we can send a reply whenever someone uses this command. Click on **+** to add a step and select **Reply to interaction**. When a user uses the command we call that an interaction.

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FFj5v5wTrRDg1FM0E8cZ7%2FScreenshot%202024-04-06%20at%2017.38.16.png?alt=media&#x26;token=bde34596-c6fc-4e78-894a-6b8bcf26cfc2" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2FfFYOUrEUYCVlhd9bLYdP%2FScreenshot%202024-04-06%20at%2017.39.42.png?alt=media&#x26;token=b67210c2-db19-41c6-87f7-c853febe374d" alt="" width="375"><figcaption></figcaption></figure>

Select **Trigger > Interaction** as Interaction.

<figure><img src="https://3295602690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRfG9QvNConKIyipM24L%2Fuploads%2Frcpn78p1k2qapFhsC8zA%2FScreenshot%202024-04-06%20at%2017.43.03.png?alt=media&#x26;token=6fb131ee-4d30-4141-a48a-eee778ad2d68" alt=""><figcaption></figcaption></figure>

**Ephemeral** messages are only shown to the user that used the command. If you select **No**, the reply is seen by everyone that can access the channel where the user used the command.

Enter some text into the **Content** field and click **Create** button to create the automation.
