> For the complete documentation index, see [llms.txt](https://docs.asagi.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.asagi.xyz/server-control/interactive-messages/actions.md).

# Actions

Actions define what happens when a member presses a button or chooses an option from a select menu.

Actions can be configured on regular buttons and on individual select-menu options.

### Available Actions

| Action                      | What it does                                                            |
| --------------------------- | ----------------------------------------------------------------------- |
| **Send a message**          | Responds to the member through the interaction                          |
| **Send a channel message**  | Sends a message to a selected Discord channel                           |
| **Direct message a member** | Sends a DM to the member who interacted                                 |
| **Send a confession**       | Opens the Anonymous Messages submission flow                            |
| **Assign roles**            | Adds selected roles to the member                                       |
| **Remove roles**            | Removes selected roles from the member                                  |
| **Toggle roles**            | Adds roles the member does not have and removes roles they already have |

A component can run multiple actions. **Send a confession** is the exception and must be used by itself.

Link buttons do not use actions.

> 🎬 **Configure actions**
>
> See how to attach actions to an Interactive Message component and test the result in Discord.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hy8ldYgZJ9GQJFAuYLR%2Fuploads%2FgxAgpYg0ANIozqZqYBwd%2Finteractive%20messages%20configured%20actions.mp4?alt=media&token=4107f7d4-053a-4adc-962f-1090796ef243>" %}

### Send a Message

**Send a message** replies to the member through the same Discord interaction.

You can use custom content or a saved **Embed Message** template.

**Ephemeral message** is enabled by default. An ephemeral response is only visible to the member who used the component. Disable it when the response should be visible publicly in the channel.

### Send a Channel Message

**Send a channel message** sends custom content or a saved template to a channel you choose.

Asagi needs access to the destination channel and permission to send the content there.

### Direct Message a Member

**Direct message a member** sends custom content or a saved template to the member who used the component.

If that member cannot receive DMs from Asagi, the action fails.

### Send a Confession

**Send a confession** opens the submission flow from **Anonymous Messages**.

Anonymous Messages must already be enabled and have a public destination channel configured. If Manual Moderation is enabled there, the new submission follows that moderation flow before it becomes public.

Members who are blocked from using Anonymous Messages cannot submit through this action.

Because this action opens its own submission flow, it cannot be combined with other actions on the same component.

### Role Actions

Role actions work on the member who used the component.

| Action           | Result                                                           |
| ---------------- | ---------------------------------------------------------------- |
| **Assign roles** | Adds the selected roles if the member does not already have them |
| **Remove roles** | Removes the selected roles the member currently has              |
| **Toggle roles** | Adds each selected role when absent and removes it when present  |

Asagi needs **Manage Roles**, and its highest Discord role must be above every role it needs to manage.

Avoid configuring conflicting actions for the same role on one component. Actions are processed in order, so combining Assign, Remove, or Toggle for the same role can produce an unexpected final state.

> 🖼️ **Role action setup**
>
> Role actions can manage one or more Discord roles from the same interactive component.

<figure><img src="https://3927572991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hy8ldYgZJ9GQJFAuYLR%2Fuploads%2FfknEc37LHKIW9RCewY9o%2Fedit_buttons_toggle_roles_transparent_clean_2x.webp?alt=media&amp;token=a65466a9-9cc4-4c2d-b5c2-33cfcf9b93ae" alt=""><figcaption></figcaption></figure>

### Select Menu Actions

Actions are attached to individual select-menu options rather than to the menu as a whole.

If multiple selections are allowed, Asagi runs the actions from every option the member selected.

### Troubleshooting

If an action does not complete, check that its configured channel, role, or template still exists and that Asagi has the required Discord permissions.

Role actions require **Manage Roles** and valid role hierarchy. Channel-message actions require permission to view and send messages in the destination channel.

Action failures can also appear in dashboard notifications.

### Where to Go Next

You have now covered the main Interactive Messages workflow: creating the message, building its components, and connecting actions.
