v5.0.0
$moveSong
This function moves a song from x to y. If y is an invalid position, it will remove the song from the queue
1
$moveSong[from;to]
Copied!
First thing we should recognize our queue. Lets make up a queue to use for moveSong
  1. 1.
    Marshmello ft. Bastille - Happier (Official Music Video)
  2. 2.
    Lukas Graham - 7 Years [Official Music Video]
  3. 3.
    Gotye - Somebody That I Used To Know (feat. Kimbra) - official music video
1
bot.command({
2
name: "moveSong",
3
code: `
4
$moveSong[2;3]
5
`
6
/*
7
Using our example queue, our code just moved
8
the second song in queue (Lukas Graham - 7 Years [Official Music Video])
9
to the third song in queue
10
​
11
So our new queue will look like:
12
1. Marshmello ft. Bastille - Happier (Official Music Video)
13
2. Gotye - Somebody That I Used To Know (feat. Kimbra) - official music video
14
3. Lukas Graham - 7 Years [Official Music Video]
15
*/
16
})
Copied!
Last modified 1mo ago
Copy link
Edit on GitHub