> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dogebot.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Saving and fixing problems

> Save your work, find problems, and fix blocks that fail.

## Saving

Press **Save** in the builder's top bar. Your bot uses the new version right away.

### Problems

The builder checks your blocks while you work. The **Problems** button in the top bar shows how it's going:

* **No problems** means all is good.
* If there are problems, it shows how many. Press it to see which block to fix.

### Auto save

With **Auto save** on, the builder saves for you, so you never lose work. Turn it on in **Builder Settings** (top bar).

* It is **off** at first.
* It saves about **2 seconds** after your last change, and at most once every 10 seconds.
* It **waits if there are problems**. You see a message like "Auto save waiting: 1 problem to fix". Fix the problem and it saves again.

## When a block fails

Sometimes a block cannot do its job. Maybe the bot's role is too low to give a role, or a member has their DMs closed. DogeBot gives you three ways to deal with it.

**1. Worked and failed paths**

For **one block**. Many blocks can have two extra ways out:

* a **green** path: what to do if it **worked**
* a **red** path: what to do if it **failed**

Each path has its own **+** button. Press the red **+** and add, for example, a **Reply**: `I couldn't give you the role. Please tell a moderator.`

Now only that one block is handled, and the rest of your command carries on normally.

**2. If something breaks**

For the **whole command**. Press the **first block** of your command. Its settings have a part called **If something breaks**. It decides what happens when **any** block fails and you did not add a red path for it:

| Choice | What happens |
| - | - |
| **Explain the problem** | The bot tells the person, in simple words, what went wrong. |
| **My own message** | The bot sends a message you write, like "Oops! Try again later." |
| **Stay silent** | The bot says nothing. |
| **Alert a staff channel** | The bot tells your staff in a channel you pick, so they can fix it. |
| **Skip the broken block and continue** | The bot skips the block that failed and does the rest. |

This also works for events and WhatsApp flows.

**3. Heads up**

**Before it even runs.** If the builder thinks a block will fail, the block gets a **Heads up** tag. Press it to see why, and fix it before anyone uses the command.

## Find and fix: Error Logs

Every failure is saved in **Error Logs** (in the sidebar, and in the builder's side bar). Each error tells you **which block** failed and **why**, in simple words, with who ran it, where, when and the values at that moment. Many errors come with a **fix tip**.

| Button | What it does |
| - | - |
| **Show in builder** / **Open the block** | Opens the builder with the broken block picked, so you can fix it. |
| **Mute** | Stops showing this kind of error. |
| **Dismiss** | Removes it from the list. |

A block that failed in a real run gets a dashed outline and an **Error** tag on the board. More in [Error Logs](/your-bot/error-logs).

## Watch it run: Replays

A **Replay** is like a video of your command running. It shows which blocks ran, in what order, and what the values were. It is the best way to find out **why** your bot did something.

**1. Open the builder**

Open a command or event in the builder.

**2. Use it in Discord**

Use it in Discord while the builder is open. DogeBot records the run by itself.

**3. Open Replays**

Open the **Replays** panel under the board. On a phone, press **Test**.

**4. Watch**

Press **Play** to watch it, or **Step** to go one block at a time. You can change the speed and jump around with the timeline.

> [!NOTE]
>
> To record your own runs, link your Discord account to DogeBot (**Link Discord** in the sidebar). You can switch recording on or off in **Builder Settings**.

* **Track values:** press a block and turn on **Track** to see how a value changes, like someone's coins. You can track up to 4 variables. The replay shows their values at every step.
* **Replay note:** this block writes values into the replay, so you can check them without sending test messages.

| Plan | Replays kept |
| - | - |
| Free | The last 10 runs of each command or event |
| Premium | The last 20 runs, and you can record other people's runs for 10 minutes |

## The most common reasons blocks fail

| Problem | Fix |
| - | - |
| The bot cannot give or remove a role. | In Discord, go to **Server Settings**, then **Roles**, and drag your bot's role **above** the role it should give. See [Role and permission errors](/help/role-and-permission-errors). |
| The bot cannot post in a channel. | Give the bot permission to **View Channel** and **Send Messages** in that channel. |
| A DM did not arrive. | The member has DMs from server members turned off. Add a red path that replies in the channel instead. |
| The bot cannot kick, ban or time out someone. | The bot needs that permission, and its role must be above the member's highest role. Nobody can act on the server owner. |
| A message is empty. | Every message needs some text, an embed or a picture. |
| A message event does nothing. | Turn on the **Message Content Intent** in the Discord Developer Portal. |
| A join or leave event does nothing. | Turn on the **Server Members Intent**. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.