# Add to Queue

{% hint style="warning" %}
This action requires a [Premium Subscription](/premium/premium-and-priority-hosting-plans.md#premium-plans) to function.
{% endhint %}

<figure><img src="/files/daF4Rh4AzV3a9EIEVfBW" alt=""><figcaption></figcaption></figure>

The Add to Queue action lets you search for tracks or paste a URL and add them to the music player’s queue.

## Server

This setting allows you to target a server. You have two options to select from:

{% tabs %}
{% tab title="Current Server" %}

<figure><img src="/files/AwoU2UKcfbmtcE9P6qob" alt=""><figcaption></figcaption></figure>

When you select the 'Current Server' option, the track will be added to the queue of the current server.
{% endtab %}

{% tab title="Server ID" %}

<figure><img src="/files/BL5Y9J0bEnnF8I9pqxZZ" alt=""><figcaption></figcaption></figure>

When you select the 'Server ID' option, the track will be added to the queue of the provided server ID.

### Server ID

In this field you can enter the ID of the server where you want to add the track to the queue. Variables can be used in this field.
{% endtab %}
{% endtabs %}

## **Search Query or URL**

<figure><img src="/files/LvTkY4ALMfJutd4hg4Jz" alt=""><figcaption></figcaption></figure>

Enter a song name, artist, or paste a direct URL from any supported platform. The search supports normal text queries as well as links from Spotify, Apple Music, and SoundCloud, automatically detecting and loading the correct track based on what you enter.

## Remove Mode

This setting lets you choose how tracks should be removed from the music queue. You have three options to select from:

{% tabs %}
{% tab title="Add to End of Queue" %}

<figure><img src="/files/b36cwbOxSbUqI2vMJSQq" alt=""><figcaption></figcaption></figure>

Adds a track to the end of the queue.
{% endtab %}

{% tab title="Add to start of Queue" %}

<figure><img src="/files/PJ4UKzL2VDgvvnmHRj3R" alt=""><figcaption></figcaption></figure>

Adds a track to the start of the queue so it plays next.
{% endtab %}

{% tab title="Add at a Specific position" %}

<figure><img src="/files/k8QGMoDlh7RpK9nfaD8H" alt=""><figcaption></figcaption></figure>

Adds a track to the queue at a specific position.

### Queue Position

Use the Queue Position field to specify which track should be removed. Position values start at 0, where 0 is the first track and 1 is the second track.
{% endtab %}
{% endtabs %}

## Playlist Load Limit

<figure><img src="/files/487O7warSa2YOM3ikoEQ" alt=""><figcaption></figcaption></figure>

Maximum number of tracks to load from playlists. Accepts values from 1 to 250.


---

# 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/music-actions/add-to-queue.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.
