Music
seekMusic
$seekMusic[]
Seeks to a specific position in the currently playing track
Syntax
$seekMusic[position]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| position | integer | check_circle Required | — | The position to seek to, in seconds |
Return Value
void
Seeks to the specified position; does not return a value
Seeks to a specific position in the currently playing track. The position parameter is specified in seconds (not milliseconds). Use $lavalinkPosition (which returns milliseconds) to read the current position. Seeking to 0 restarts the track from the beginning.
Examples
Seek to 30 seconds
$seekMusic[30]
$sendMessage[⏩ Jumped to 30 seconds.]
Skip to 1 minute
$seekMusic[60]
$sendMessage[⏩ Jumped to 1:00.]
Rewind to the beginning
$seekMusic[0]
$sendMessage[⏪ Restarted from the beginning.]
Seek forward by 10 seconds
$let[newPos;$sum[$divide[$lavalinkPosition[];1000];10]]
$seekMusic[$var[newPos]]
$sendMessage[⏩ Skipped forward 10 seconds.]