1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-11 09:32:50 +00:00

feat(Bot): add restart command - update discordgo

This commit is contained in:
2020-08-12 23:12:24 -05:00
parent b308123cff
commit 52341faea9
7 changed files with 93 additions and 56 deletions

View File

@@ -109,6 +109,10 @@ func (conn *AudioConnection) handleMessage(m *discordgo.MessageCreate) {
case "random":
conn.PlayRandomAudio(m, nil)
// restart command handled in bot file - needed here to break out
case "restart":
break
default:
conn.PlayAudio(command, m, nil)
}
@@ -375,7 +379,7 @@ loop:
for {
select {
// grab incomming audio
// grab incoming audio
case opusChannel, ok := <-conn.VoiceConnection.OpusRecv:
if !ok {
continue