Skip to content

Commit

Permalink
disconnect at end of queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Depado committed Nov 13, 2020
1 parent afd62a1 commit 4c2751b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions player/play.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ func (p *Player) Play() {
tracklen := p.Queue.Len()
if tracklen == 0 {
p.SendNotice("Nothing left to play!", fmt.Sprintf("You can give me more by using the `%s` command!", p.conf.Bot.Prefix), "")
if err := p.Disconnect(); err != nil {
p.log.Err(err).Msg("unable to disconnect from voice channel")
}
return
}

Expand Down

0 comments on commit 4c2751b

Please sign in to comment.