Managing Commands 

Creating a Slash Command

 Commands can be custom built for your team according to your requirements, and do not have many restrictions. The process of building one is pretty simple as such. Follow the steps given below to create a command.

1. Click on your display picture and select Bots and Tools.

2. From there select Commands that appears as the second option in the integrations page. Now, click on Create Command and go about filling the below fields.

  • Name : Command Name. 
  • Hint : Provide a small note about your command utility. 

NOTE:  A Command name can contain only alphabets and a maximum of 20 characters and hint can contain a maximum of 100 characters.

  • Access Level : Choose who gets to access your command. Select from Organisation, Team and Personal. Default access level is set to personal.

  • Code Visibility : Decide if you want to let people view your command code. Code visibility is dependent on access level, when Access Level = Organization the command code will be visible to everyone in the Organisation. The command codes can be viewed by choosing the Edit Code option, upon clicking the command name.
  • Click to execute : Executes the command on clicking a suggestion. 
  • Image : Image describing your command.
  • Description : An in-depth description of the command and its purpose.
  • Parameters : Command parameters are key - value pairs, where the key is a unique identifier linked to a some data that is identified. Learn more about Parameters in Command Execution Handler.

3. Fill the required information, clicking Save & Edit Code will direct you to the command Execution Handler which lets you build your command.

For a better understanding we've charted down the mandatory and optional fields.

FILED NAMEMANDATORYOPTIONAL
Name

         ✓

 
Hint

         ✓

 
Access Level

         ✓

 
Code Visibility 

       ✓

Click to Execute 

       ✓

Image 

       ✓

Description 

       ✓

Parameters 

       ✓

How to edit a command?

Commands can be edited anytime to broaden or narrow down their scope. Cliq let's you edit a command in two different ways.

  • Edit Code
  • Edit Configuration

How to Edit the Code?

Edit Code let's you modify the command execution code to change the behaviour of the command. This can be done in two ways. One by hovering on the commands name and selecting the Edit Code option and two by clicking on the command name and selecting the Edit Code from the command preview. Clicking on the Edit Code option will direct you to the Execution Handler page where the actual changes to the commands are done. 

How to edit the configuration?

You can edit the configuration of a command by clicking on the command and selecting the Edit Configuration option in the command preview. Configurations are edited to make changes to the mentioned fields above which includes Name of the Command, Hint and more.

To edit the command suggestion code, select the drop down arrow next to the Execution Handler on top of the page and select Suggestion Handler. A workspace with a sample code is displayed to which changes can be done.

Deleting a command:

To delete a command hover over the command name and  click the "—" icon. A pop-up to confirm about the command deletion will be displayed and clicking the Delete option will delete the command. Once the command is deleted, it cannot be retrieved back.