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

# Block library

> The blocks you use to build commands and events, and the ones people use most.

**Blocks** are the pieces you snap together to build a command or an event. Each block does one small job, like sending a message, giving a role or saving a value. Your bot follows the lines from the top block down.

![The DogeBot command builder with blocks connected on the board](https://mintcdn.com/doge-bot/0C6-zgXTpDx1QOCe/images/guide/builder-command.png?fit=max\&auto=format\&n=0C6-zgXTpDx1QOCe\&q=85\&s=b7568b03c11d216dd65caf823f2b7d7a)

## The three kinds of blocks

In the block list, the blocks are in tabs:

> **Inputs**
>
> Boxes the person fills in when they use a **slash command**, like picking a member or typing a number. Only slash commands have Inputs.

> **Steps**
>
> Blocks that **do** something, like send a message, give a role or save a value.

> **Checks**
>
> Blocks that **ask a question** and go one way or the other, like "does this person have the Moderator role?".

> [!NOTE]
>
> Right-click (context) commands and the Event Builder only show **Steps** and **Checks**.

## Most used blocks

New here? These are the blocks you will use again and again.

| Block | Kind | What it does |
| - | - | - |
| **Reply** | Step | Answers the person with a message. |
| **Reply with a card** | Step | Answers with a card-style message. |
| **Message** | Step | Sends or edits a message, with optional buttons and select menus. |
| **Layout message** | Step | Builds a bigger message with sections, text, pictures, buttons and menus. |
| **Save a value** | Step | Saves something in one of your variables, like a member's coins. |
| **Do the maths** | Step | Adds, takes away or works out a new number for a variable. |
| **Give roles** | Step | Gives one or more roles to a member. |
| **Pause** | Step | Waits a little before the next block runs. |
| **Compare** | Check | Compares two values, like "are coins 500 or more?". |
| **Random chance** | Check | Goes one way only some of the time, like a 10% chance. |
| **Make an image card** | Step | Makes a picture from your Card Studio design. Put `{card}` in a later message to send it. |

> **[Save a value](/variables/use-your-variables-in-blocks)**
>
> How to save and change variables with blocks.

> **[Send cards from your bot](/card-studio/send-cards-from-your-bot)**
>
> How the Make an image card block works.

![The Save a value block in the DogeBot builder](https://mintcdn.com/doge-bot/0C6-zgXTpDx1QOCe/images/guide/block-save-value.png?fit=max\&auto=format\&n=0C6-zgXTpDx1QOCe\&q=85\&s=8cf10bcdd7297d37ffcfede95376380e)

![The Do the maths block in the DogeBot builder](https://mintcdn.com/doge-bot/0C6-zgXTpDx1QOCe/images/guide/block-do-maths.png?fit=max\&auto=format\&n=0C6-zgXTpDx1QOCe\&q=85\&s=be60e5adbca755f937feb925cbbbe204)

## What a block looks like

Every block has a **white icon**, a **name**, a short line about what it does and a small **pill** that tells you what kind of block it is: **Action**, **Condition**, **Event** or **Slash command**.

* Blocks connect with lines between round, hollow **dots**.
* Press the dashed **+** circle under a block to add the next one, already connected.
* Press the round **×** on a line to remove it.
* The block you are editing gets a **gold ring**.
* **Arrange** lines all your blocks up in neat rows.

## Checks have two ways out

A **Check** block has two ways out: one for **yes** and one for **no**. Connect different blocks to each.

> **Example**
>
> After **Compare** "coins 500 or more?":
>
> * **Yes**: "You bought VIP!"
> * **No**: "You need 500 coins."

## Worked and failed paths

Many Step blocks can also show a **green** path (it worked) and a **red** path (it failed). Each has its own **+**. Use the red path for things like "if the ban fails, tell the moderator".

## Find blocks by group

> **[Message blocks](/block-library/message-blocks)**
>
> Replies, messages, buttons and menus.

> **[Command input blocks](/block-library/command-input-blocks)**
>
> Text, Number, User, Channel, Role, Choice and Attachment.

> **[Repeat and wait blocks](/block-library/repeat-and-wait-blocks)**
>
> Loops, pauses and the typing dots.

> **[Event triggers](/event-triggers)**
>
> Every event your blocks can run under.

> [!TIP]
>
> Can't find a block? Type a word like `role`, `button` or `repeat` in the search box at the top of the block list.


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