> From the BotGhost docs: https://botghost.com/docs/custom-commands-and-events/actions/legacy-reply-actions/direct-message-a-user
> Every page: https://botghost.com/docs/llms.txt

# Direct Message a User

> **Important:** While the Direct Message a User action block is still available for use in all commands and events, it is considered old and has been replaced by the [Send or Edit a Message](https://botghost.com/docs/custom-commands-and-events/actions/message-actions/send-or-edit-a-message) action block. We advise you to use the [Send or Edit a Message](https://botghost.com/docs/custom-commands-and-events/actions/message-actions/send-or-edit-a-message) block instead, which offers more functionalities and possibilities for your message.

> **Warning:** If you cannot see the Direct Message a User action block in your actions list, disable the [Hide Legacy Reply Actions](https://botghost.com/docs/custom-commands-and-events/command-and-event-builder/advanced-options#general) setting.

![](https://botghost.com/docs/content/assets/workspace/image_2024-05-30_164536014.png)

When triggered, the Direct Message a User action responds with a DM to a user of your choosing. This message can either be sent to the user who triggered the block, a user option, or a user ID. All variables and options can be used in the content of the reply.

## User to DM

> **Warning:** To receive a direct message, the user must have Direct Messages enabled.

The Direct Message a User action has three options that change to whom the message of the action is sent. Below you can find detailed information about each option and how it can be used.

![](https://botghost.com/docs/content/assets/workspace/image%20(798).png)

**User who used the command**

By selecting this option your Direct Message will be sent to the user who used the most recent interaction; for example, the most recent button press, select menu choice, command run or the user who triggered the custom event.

**User option**

In commands, by selecting this option your Direct Message will be sent to a user selected in a user option.

![](https://botghost.com/docs/content/assets/workspace/image%20(799).png)

### User Option

Here you can set the option variable for the [User option](https://botghost.com/docs/custom-commands-and-events/actions/legacy-reply-actions/direct-message-a-user#user-option) (purple blocks) you are using. These can be easily added through the variable selector by clicking the **Clipboard** button.

**User ID**

By selecting this option your Direct Message will be sent to a user specified via their user ID.

![](https://botghost.com/docs/content/assets/workspace/image%20(800).png)

### User ID

Here you can set the ID of the user to DM. You can do this by pasting an ID directly from Discord (learn how [here](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID#h_01HRSTXPS5H5D7JBY2QKKPVKNA)) or using a variable that returns a user ID. These can be easily added through the variable selector by clicking the **Clipboard** button.

## Message

In the Direct Message a User action, you have the choice for each message to be plain text, or an embed.

**Plain Text**

![](https://botghost.com/docs/content/assets/workspace/image%20(750).png)

### Content

The content of the action is the actual message that the bot should reply with when the action is triggered. You can use any variable or option in the content of this reply. These can be easily added through the variable selector by clicking the **Clipboard** button.

![](https://botghost.com/docs/content/assets/workspace/image%20(752).png)

**Embed**

![](https://botghost.com/docs/content/assets/workspace/image%20(751).png)

### Author

The author is displayed in the top left of the embed. This can be the author who used the command or any information you wish to display.

![](https://botghost.com/docs/content/assets/workspace/image%20(756).png)

### Thumbnail URL

You can include a thumbnail embedded into the Embed Reply. This will display in the top right of the Embed.

![](https://botghost.com/docs/content/assets/workspace/image%20(757).png)

### Title

This is the title you wish to display in your Embed Reply. This will be centered above your Content Block.

![](https://botghost.com/docs/content/assets/workspace/image%20(758).png)

### Description

The description is the actual message that the bot should reply with when the action is triggered. You can use any variable or option in the content of this reply. These can be easily added through the variable selector by clicking the **Clipboard** button.

![](https://botghost.com/docs/content/assets/workspace/image%20(759).png)

### Image URL

This will display an image in full view under the Content Block.

![](https://botghost.com/docs/content/assets/workspace/image%20(760).png)

### Footer

This is the small text at the bottom left of the embed.

![](https://botghost.com/docs/content/assets/workspace/image%20(761).png)

### Embed URL

This will display the Title of the embed in blue text, you can click this to open an external page or image.

![](https://botghost.com/docs/content/assets/workspace/image%20(758).png)

### Color

This is the color shown on the Left Side of the Embed Reply.

![](https://botghost.com/docs/content/assets/workspace/image%20(762).png)

## Reactions

Reactions can also be added to the reply. These can be added by clicking the reactions dropdown and selecting emojis.

![](https://botghost.com/docs/content/assets/workspace/image%20(814).png)

These reactions will be automatically added to the reply.

![](https://botghost.com/docs/content/assets/workspace/image%20(802).png)

## Optional Variable

You can also create your own variable that can be used anywhere in the command to get the ID of the message sent by the action. This is useful when using [Send an API Request](https://botghost.com/docs/custom-commands-and-events/actions/api-actions/send-an-api-request) in your command / event and you need the ID of the message. Make sure that the name of the variable does not correspond to the name of a default variable or of an another action.

You can copy the variable by clicking the clipboard icon in the section right below the optional variable field.

![](https://botghost.com/docs/content/assets/workspace/image%20(98).png)
