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

# Reaction events

> These run when someone adds or removes an emoji reaction on a message.

These run when someone adds or removes an emoji reaction on a message.

> **Example**
>
> Give someone a role when they react with a tick. Use a **Compare** check: `{event_reaction_emoji}` **Equal to** the emoji, and `{event_message_id}` **Equal to** your message's ID.

> [!NOTE]
>
> **How to use one:** go to **Events**, press **New Event**, pick the event from the list, then add blocks under it.

## The events

> **When a reaction is added to a message**
>
> **When it runs:** someone adds an emoji reaction.
>
> **Variables:** the person, message and channel variables (see below). Plus:
>
> | Type this | What you get |
> | - | - |
> | `{event_reaction_emoji}` | The emoji used |
>
> **Build idea:** reaction roles. React with a tick on your rules message, get the Member role.

> **When a reaction is removed from a message**
>
> **When it runs:** someone takes their reaction off.
>
> **Variables:** the person, message and channel variables. Plus:
>
> | Type this | What you get |
> | - | - |
> | `{event_reaction_emoji}` | The emoji taken off |
>
> **Build idea:** take the role away again when they remove their reaction.

> **All Reactions Removed**
>
> **When it runs:** every reaction is cleared off a message at once.
>
> **Extra variables:** none.

> **Specific Reaction Removed**
>
> **When it runs:** one emoji is cleared off a message completely.
>
> | Type this | What you get |
> | - | - |
> | `{event_reaction_emoji}` | The emoji that was cleared |

## Variables every reaction event has

**The person who reacted**

| Type this | What you get |
| - | - |
| `{event_user_avatar}` | A link to their profile picture |
| `{event_user_id}` | Their ID |
| `{event_user_mention}` | Pings them |
| `{event_user_name}` | Their username |
| `{event_user_tag}` | Their full tag |
| `{event_user_username}` | Their username |

**The message**

| Type this | What you get |
| - | - |
| `{event_message_attachment_1}` | A link to the first file |
| `{event_message_attachments}` | Links to all files |
| `{event_message_attachments_count}` | How many files |
| `{event_message_channel}` | Mentions the channel |
| `{event_message_channel_id}` | The channel ID |
| `{event_message_channel_name}` | The channel name |
| `{event_message_channel_type}` | What kind of channel |
| `{event_message_content}` | What the message says |
| `{event_message_createdAt}` | When it was sent |
| `{event_message_has_attachments}` | true if it has files |
| `{event_message_has_poll}` | true if it has a poll |
| `{event_message_id}` | The message ID |
| `{event_message_poll_question}` | The poll question |

**The channel**

| Type this | What you get |
| - | - |
| `{event_channel_id}` | The channel ID |
| `{event_channel_is_thread}` | true if it is a thread |
| `{event_channel_name}` | The channel name |
| `{event_channel_parent_id}` | The category ID |
| `{event_channel_parent_name}` | The category name |
| `{event_parent_channel_id}` | The category ID |

## Example: a reaction role

**1. Pick the event**

Make a new event with **When a reaction is added to a message**.

**2. Check the message**

Add a **Compare** check: `{event_message_id}` **Equal to** your rules message's ID.

**3. Check the emoji**

Add another **Compare** check: `{event_reaction_emoji}` **Equal to** the tick emoji.

**4. Give the role**

On the yes path, add **Give roles** and pick the role.

> [!TIP]
>
> Buttons are often easier than reactions for roles. See [Role buttons](/build-real-systems/role-buttons).


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