Message Commands

Creating a Command

This example will show you how to create a simple command, which will send a message, and an image when used. On the Commands page, click "Add Command".

After typing the name of the command (what your users will type with your prefix to use it), click "Add".

You will see that a node with title "MessageExample" has been added to the flow. Double click the header (blue area) of the node to open it.

From the "Edit Command" window you can rename the command, or add role permissions for this command.

Adding Message Responses to the Command

Now we can add some responses that will occur whenever this command is typed. Clicking the "Add Response" button at the top of the page will prompt you to create a new response. Here you can configure the name and type of the response. For now I will add a "Send Message" response type:

After clicking "Add", you will see that a new response node has been added to the flow. In order for this response to be called when our MessageExample command is used, we must connect it to the command node. This can be done by clicking the output of the command node, dragging, and clicking the input on the response node.

It is important now to click "Save Flow" at the top of the screen to ensure this connection is saved. Next, the response node can be edited by double clicking its header to open it. Here, you can enter a channel name to send the message to, and the message content.

After entering the channel and response text, "Save" can be clicked. Next, we can add a new node to send an image when the "MessageExample" command is used. Click "Add Response" once again, and this time change the response type to "Send Image".

Now you will see that a "Send Image" type node has also been added. Double click into it to edit the response information. Here you can once again specify the channel to send the image to, and enter the URL for the image to send.

After saving this node, we can connect it to the previous message node, and make sure to click "Save Flow" afterwards to save these changes. Here's what our finished message command flow will look like:

Last updated