# Pin a Message

<figure><img src="https://1937909199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm_hW5MApY3J0lRhi0M%2Fuploads%2FJML9PFj9ctJZDVpS4KS1%2Fimage_2024-05-30_164440309.png?alt=media&#x26;token=6ee189a9-b1e4-4836-8f54-46fa893e6a81" alt=""><figcaption></figcaption></figure>

When triggered, the Pin a Message action pins a message associated with the command or event it is used in. This will also trigger a system message in the channel showing that a message has been pinned.

## Response Action

In this section, you can manage which message the bot will pin. You can select from a dropdown that will display the bot's messages, as well as any related to the event, if applicable. The selected message will be highlighted in red.&#x20;

<figure><img src="https://1937909199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm_hW5MApY3J0lRhi0M%2Fuploads%2FKjgr6YwtSPcwOmMteL14%2Fimage.png?alt=media&#x26;token=a8245247-d857-4e28-9396-5e68169eea94" alt=""><figcaption></figcaption></figure>

***

Below is an example of a simple command that sends a [plain-text-reply](https://documentation.botghost.com/custom-commands-and-events/actions/legacy-reply-actions/plain-text-reply "mention") and pins it.

<figure><img src="https://1937909199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm_hW5MApY3J0lRhi0M%2Fuploads%2FTdvavmJirERz2yoGykSB%2Fimage.png?alt=media&#x26;token=055432ca-8c3e-47c3-ae8f-7e3782dd0f99" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.botghost.com/custom-commands-and-events/actions/message-actions/pin-a-message.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
