removed clearQueue
This commit is contained in:
1 parent
1334096029
commit
0ca13a53b9
2 files changed
+1
-13
No files matched your search
@@ -369,14 +369,6 @@ func playSound(play *Play, vc *discordgo.VoiceConnection) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
func clearQueue() {
|
||||
for key, _ := range queues {
|
||||
delete(queues, key)
|
||||
}
|
||||
discord.Close()
|
||||
discord.Open()
|
||||
}
|
||||
|
||||
func onReady(s *discordgo.Session, event *discordgo.Ready) {
|
||||
log.Info("Received READY payload.")
|
||||
}
|
||||
|
||||
+1
-5
@@ -90,11 +90,7 @@ func handlePlaySound(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
if user != nil && guild != nil && soundCollection != nil {
|
||||
if sound != nil {
|
||||
if sound.Name == "clearqueue" && soundCollection.Prefix == "1" {
|
||||
clearQueue()
|
||||
} else {
|
||||
go enqueuePlay(user, guild, soundCollection, sound)
|
||||
}
|
||||
go enqueuePlay(user, guild, soundCollection, sound)
|
||||
} else {
|
||||
go enqueuePlay(user, guild, soundCollection, soundCollection.Random())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user