# Using the Bot Editor

DBS offers two main pages for editing your bot: **Commands** and **Events**. They are similar in the way they work, in that you connect nodes in a flowchart style.&#x20;

### Commands & Intro

We will begin on the **Commands** page. Get there from the home screen by clicking "Commands" in the upper right navigation bar.&#x20;

When you load your first bot (if you haven't made a bot yet please see the first tutorial on this site) you will see something like this on the commands page.&#x20;

![](/files/-MF3djbIR-KYZSgclIIO)

The darker blue boxes on the left represent commands, and the lighter blue boxes are responses. The command is what a user will type in the server to trigger the responses that are connected to it. For example, if a user types !help (assuming the prefix is !), then the "help menu" response will be triggered. You can connect any number of response to a command. If you run the bot with these default commands, you can test them out in a server to get a feel for how they work.

To open a node (a box), simple double click it on the colored header area. Doing so will automatically bring up a window where you can edit the details of this node.&#x20;

![](/files/-MF3eJ01PePS5-2Mi8rW)

Once you are done editing the information, you can click save in the bottom right to save and close this window.&#x20;

To add a new command or response, simply click "Add Command" or "Add Response" from the button bar at the top.&#x20;

To connect two nodes, you can click the output of a node, release click, then drag to the input of another node, once there, click again to connect.&#x20;

![Adding a new response and connecting it to a command](/files/-MF3fVKwEV6AF4DnQQzF)

Make sure you click "Save Flow" after making node connections to make sure they are saved!

### Events

The Events page is very similar in look and feel to the Commands page. Here is what you will see when you first load the Events page for a new bot.

![](/files/-MF3gFYsgVmZdckOxRXy)

The pink nodes are the available server events which you can connect responses to, similar to the commands.&#x20;

* **User Joins Server** - this event is fired when a new user joins the server. Connect responses to this to create a welcome message for new users.&#x20;
* **User Kicked** - this event is fired when a user is kicked or leaves the server.
* **User Banned** - this event is fired when a user is banned from the server.
* **Any Message** - this is fired when any message is sent, even if it doesn't contain the prefix for commands. This is great for things like XP systems, where you want to give users xp for each message they send.&#x20;
* **Bot Initialization** - this fires when the bot starts running.&#x20;

Unlike commands, you cannot add any more events to this screen.&#x20;


---

# 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/setting-up-dbs/getting-started-with-flow-based-bot-creating-with-dbs.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.
