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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user