Skip to content

Commit

Permalink
Send over position when setting track
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Mar 11, 2024
1 parent 08dabd4 commit 2938dbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import dev.arbjerg.lavalink.client.protocol.TrackUpdateBuilder
interface IUpdatablePlayer {
/**
* Shortcut for setting the encoded track. This will also send any user-data supplied.
* Please keep in mind that this will set the position field to the current position of the track.
*
* @param track The track to apply to this builder
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class PlayerUpdateBuilder internal constructor(private val node: LavalinkNode, p
userData = track?.userData?.toKotlin().toOmissible()
).toOmissible()

this.position = track?.info?.position.toOmissible()

return this
}

Expand Down

0 comments on commit 2938dbf

Please sign in to comment.