removed clearQueue

This commit is contained in:
da
2017-08-03 18:46:40 +02:00
parent 1334096029
commit 0ca13a53b9
2 changed files with 1 additions and 13 deletions
-8
View File
@@ -369,14 +369,6 @@ func playSound(play *Play, vc *discordgo.VoiceConnection) (err error) {
return nil return nil
} }
func clearQueue() {
for key, _ := range queues {
delete(queues, key)
}
discord.Close()
discord.Open()
}
func onReady(s *discordgo.Session, event *discordgo.Ready) { func onReady(s *discordgo.Session, event *discordgo.Ready) {
log.Info("Received READY payload.") log.Info("Received READY payload.")
} }
+1 -5
View File
@@ -90,11 +90,7 @@ func handlePlaySound(w http.ResponseWriter, r *http.Request) {
} }
if user != nil && guild != nil && soundCollection != nil { if user != nil && guild != nil && soundCollection != nil {
if sound != nil { if sound != nil {
if sound.Name == "clearqueue" && soundCollection.Prefix == "1" { go enqueuePlay(user, guild, soundCollection, sound)
clearQueue()
} else {
go enqueuePlay(user, guild, soundCollection, sound)
}
} else { } else {
go enqueuePlay(user, guild, soundCollection, soundCollection.Random()) go enqueuePlay(user, guild, soundCollection, soundCollection.Random())
} }