Hi Everybody!
I hope you guys tried the /zdocs command and now have an idea of how command suggestions with click to execute work. If you have no clue of what command suggestion is, I recommend you to take a look at all the Slash Command Series posts, especially the one on
Command Suggestions
! This post is all about the different types of command suggestions.
Customise your command suggestions
Did you know you could customise your command suggestion list with a title, description, image? Well, now you do! So let's try creating a few sample suggestions. Also, keep in mind that disabling the 'Click to Execute' option will allow users to make multiple selections from the suggestions list!
A single suggestion entity can have the following
You can return an array of suggestion entities in the command suggestion code. This will pop up the suggestion list in the chat window when the user enters the command.
Note
: Command suggestions with only description is not possible and it's not practical as well.
Command suggestions with title, description and image
-
list = List();
-
entry = Map();
-
entry.put("
title
","User Guide");
-
entry.put("
description
","Refer our User Guide to get started with Cliq!");
-
entry.put("
imageurl
","<insert_image_url>");
-
list.add(entry);
-
return list;
Command suggestions with title
-
Use the 'title' key and give your title value. The /zdocs command is an example!
-
list = List();
-
entry = Map();
-
entry.put("
title
","<insert_title>");
-
list.add(entry);
-
return list;
Command suggestions with image
-
Use the 'imageurl' key and give your image URL as the value. The /giphy command is a great example. Type /giphy followed by your key word to get the list of suggestions!
Command suggestions with title and image
-
In addition to the title key, use the 'imageurl' key and enter your image URL.
-
list = List();
-
entry = Map();
-
entry.put("
title
","User Guide");
-
entry.put("
imageurl
","<insert_image_url>");
-
list.add(entry);
-
return list;
Command suggestions with title and description
-
Use the 'description' key and enter the suggestion's description as the value.
-
list = List();
-
entry = Map();
-
entry.put("
title
","User Guide");
-
entry.put("
description
","Refer our User Guide to get started with Cliq!");
-
return list;
I suggest you to try working with command suggestions and let me know!
Suggestions and discussions are welcome!
Links to refer :
1)
Slash Command Introduction
2) Cliq Help -
Commands
Best,
Manasa
Cliq