---
description: Full functional music function
---

# Music&#x20;



{% hint style="info" %}
Important Message: Without distube it could've taken me days to make this :) Go use distube
{% endhint %}

## How to use with default settings.

```javascript
const {BotAccount} = require('sphinx-bc'); //npm i sphinx-bc@latest

new BotAccount({token: "yourBotToken"}).music({prefix: "Your Prefix"}); 
//use prefix + "help" to see the commands
```

## How to use with customization settings

```javascript
const {BotAccount} = require('sphinx-bc'); // npm i sphinx-bc@latest

new BotAccount({token: "YourBotToken"}).music({
    prefix: "YourPrefix",
        //Customizing Distube
        leaveOnEmpty: true,
        leaveOnFinish: false,
        leaveOnStop: true,
        searchSongs: 10,
        searchCooldown: 60,
        emptyCooldown: 60,
        nsfw: true
    // Customizing commands
        play: "p",
        stop: "s",
        pause: "pau",
        resume: "r",
        volume: "vol",
        queue: 'q',
        jump: "j",
        previous: "prev",
        shuffle: "shu",
        skip: "sk",
        autoplay: "auto",
        help: "h"
})
```

| options        | What they do                                       | default |
| -------------- | -------------------------------------------------- | ------- |
| leaveOnEmpty   | Leaves when the voice channel is empty             | true    |
| leaveOnFinish  | Leaves when the song is finished                   | false   |
| leaveOnStop    | Leaves when the song has stopped                   | true    |
| searchSongs    | Limit for searching songs, incoming in new updates | 10      |
| searchCooldown | Search Cooldown                                    | 60      |
| nsfw           | nsfw Search                                        | true    |

| Trigger Commands | What they do                              | default  |
| ---------------- | ----------------------------------------- | -------- |
| play             | Plays a song                              | play     |
| skip             | Skip a song in queue                      | skip     |
| stops            | Stops a song                              | stop     |
| pause            | pauses a song                             | pause    |
| resume           | Resumes a song                            | resume   |
| volume           | Changes the volume of the song            | volume   |
| queue            | Lists the current queue                   | queue    |
| jump             | Jumps into a song in the current queue    | jump     |
| previous         | Returns to the previous song in the queue | previous |
| shuffle          | shuffle the queue                         | shuffle  |
| autoplay         | Enables and disables the auto play        | autoplay |
| help             | Lists commands                            | help     |
