From 4c2751b35270d1f92af922f021071be02ee71ca3 Mon Sep 17 00:00:00 2001 From: Paul Lhussiez Date: Fri, 13 Nov 2020 20:23:54 +0100 Subject: [PATCH] disconnect at end of queue --- player/play.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/player/play.go b/player/play.go index 7c3696b..330fa63 100644 --- a/player/play.go +++ b/player/play.go @@ -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 }