> For the complete documentation index, see [llms.txt](https://documentation.botghost.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.botghost.com/custom-commands-and-events/actions/music-actions/set-loop-mode.md).

# Set Loop Mode

{% 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/fTjbLLgfQa6VnD3c1nYO" alt="" width="333"><figcaption></figcaption></figure>

The Set Loop Mode block allows you to change the loop mode of the music player to off, track, or queue.

## Server

This setting selects which server the action applies to. You have two options to choose from:

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

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

When you choose the Current Server option, the selected loop mode will be applied to the server where the command is executed.
{% endtab %}

{% tab title="Server ID" %}

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

When you select the Server ID option, the selected loop mode will be applied to the server matching the provided ID.

### Server ID

In this field, you can enter the ID of the server where you want the selected loop mode to be applied. Variables can be used in this field.
{% endtab %}
{% endtabs %}

## Loop Mode

<figure><img src="/files/NRDQNZ5mKl6w0WMNwoPS" alt="" width="375"><figcaption></figcaption></figure>

This option allows you to set the loop mode of the player.

| Name       | Raw Value | Description                |
| ---------- | --------- | -------------------------- |
| Off        | 0         | Disables looping.          |
| Loop Track | 1         | Repeats the current track. |
| Loop Queue | 2         | Repeats the entire queue.  |

You can choose this with the dropdown menu, or use a variable that returns the raw value of the loop mode you would like to set in the "Loop Mode Variable" field.
