🔦Creating a custom command
In this example, we will create a custom command /help
that will give a response specified by us
In this section I am assuming that you already read the documentation on how to make a custom event.
Preview

Let's start!
Steps
Step 1
Like custom events, custom commands are organised in playgrounds
Go to the dashboard and create a new one and then enter it

Step 2
After entering the playground, you will find something like this

You probably noted that there is an entire section dedicated to custom commands
To make the /help
command, we will need for now only the "Commands creation" category.
Expand the category, grab the first block and drag it into the "Register slash commands" block.

Let's customise our command.

We can leave the "Options" parameter blank, since we don't need that part for this guide.
Step 3
Now that we have our commands registered, we need a way to do an action whenever the command is triggered.
For that, we will need the blocks inside the "Receiving" category
Drag the "When an interaction is received" block inside the workspace

Now, we can easily put the "Reply with" block. But it's not that great since that the "When an interaction is received" block gets triggered even if it's not the command we specified. So we need to check that the interaction is the actual /help
command.
We can do that easily using an IF statement.
Open the Logic
category and grab the "IF" block.

Now, in the same category, grab the equals
block

Back to the "Receiving" category, grab the Command name
block and put it in the left side of the equals condition

Now in the "Text" category grab the Word
block and put it in the right field of the condition

In the block we just added, let's put the name of the command. In this case the name is "help"

Finally, we can add the "Reply with" block.

Step 3
It's time to customise our response!
Tip: there is a multi line block in the "Text" category, that one with a 'strange' P!

Let's use it! Now customise your response!

Step 4
Lastly, hit "Save"

Result
Let's see our command in action!


Last updated
Was this helpful?