# 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".

![](https://1776366025-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0L1z_JwGF9x5j-YBBE%2F-M0ObPBIVFe1CLyu7jj5%2F-M0Oba7tfci-3CDyG1Wc%2Faddcommand.png?alt=media\&token=c750d26e-14ce-4a0e-b698-27de8881ae33)

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

![](https://1776366025-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0L1z_JwGF9x5j-YBBE%2F-M0ObPBIVFe1CLyu7jj5%2F-M0Oc1NrjgYC0y4CC1w0%2Fcmdname.png?alt=media\&token=8830eabd-b457-4b5f-b0a5-ad22eb17de38)

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.&#x20;

![Double click this area](https://1776366025-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0L1z_JwGF9x5j-YBBE%2F-M0OcB3AtOeQhZgIdTuf%2F-M0OcNphGsjmJq8FQiDx%2Fdbl.png?alt=media\&token=d6e20573-4afc-4bb5-89e9-ced3f18d808c)

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:

![](https://1776366025-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0L1z_JwGF9x5j-YBBE%2F-M0Ocw4EuHKsVNyzTgUX%2F-M0Od9tsMb8LMmw4sr1v%2Fimage.png?alt=media\&token=f667d35f-a662-4f7d-8ae7-986151d730d7)

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.&#x20;

![](https://1776366025-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0L1z_JwGF9x5j-YBBE%2F-M0OdXJNBlB0GajYWjDb%2F-M0OeEOCSqmThSMWY04a%2Fdrag.gif?alt=media\&token=4eb819c9-a470-4914-877e-d80be89896d5)

**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.

![](https://1776366025-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0L1z_JwGF9x5j-YBBE%2F-M0OepK_GeQe27o7BfQh%2F-M0OfJaM4WffWJlvBGVN%2Fimage.png?alt=media\&token=19764853-aab4-4302-933b-62332d8562fb)

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".

![](https://1776366025-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0L1z_JwGF9x5j-YBBE%2F-M0OghpW-bhkxmaDH3Jb%2F-M0OgqAy8XWm3RlhS0in%2Fimage.png?alt=media\&token=45a1fe9b-b4b5-4f5f-acdc-d18d2ef539dc)

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.&#x20;

![](https://1776366025-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0L1z_JwGF9x5j-YBBE%2F-M0OghpW-bhkxmaDH3Jb%2F-M0OhKmtdHhPUJVyKDfn%2Fimage.png?alt=media\&token=346e06fe-be3d-4257-87ad-456de6ed96db)

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:

![](https://1776366025-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0L1z_JwGF9x5j-YBBE%2F-M0OhYtPNRYEuPxM5T30%2F-M0Ohf82TiFtToYf5-o2%2Fimage.png?alt=media\&token=3196e908-2235-46aa-88b1-0eb7b2158936)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.discordbotstudio.org/commands/untitled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
