fix: set pause state to false when playing new track
lavalink will internally force a play regardless of the prior pause state, so the player's detached pause state must reflect this
This commit is contained in:
parent
ba704b963d
commit
6e30995fe6
|
@ -27,6 +27,8 @@ func (player *Player) Play(track string) error {
|
||||||
//
|
//
|
||||||
// Setting a time to 0 will omit it.
|
// Setting a time to 0 will omit it.
|
||||||
func (player *Player) PlayAt(track string, startTime int, endTime int) error {
|
func (player *Player) PlayAt(track string, startTime int, endTime int) error {
|
||||||
|
player.paused = false
|
||||||
|
|
||||||
start := strconv.Itoa(startTime)
|
start := strconv.Itoa(startTime)
|
||||||
end := strconv.Itoa(endTime)
|
end := strconv.Itoa(endTime)
|
||||||
|
|
||||||
|
@ -62,6 +64,7 @@ func (player *Player) Stop() error {
|
||||||
// Pause will pause or resume the player, depending on the pause parameter
|
// Pause will pause or resume the player, depending on the pause parameter
|
||||||
func (player *Player) Pause(pause bool) error {
|
func (player *Player) Pause(pause bool) error {
|
||||||
player.paused = pause
|
player.paused = pause
|
||||||
|
|
||||||
msg := message{
|
msg := message{
|
||||||
Op: opPause,
|
Op: opPause,
|
||||||
GuildID: player.guildID,
|
GuildID: player.guildID,
|
||||||
|
|
Loading…
Reference in New Issue