Implement queue flush

This commit is contained in:
2021-04-09 16:21:31 +02:00
parent 4a37af0795
commit c6c370d22b
4 changed files with 6 additions and 0 deletions
+5
View File
@@ -20,4 +20,9 @@ module.exports = class AudioQueue {
this.queue.push(element);
if (this.queue.length == 1) this.playNext();
}
flush() {
this.current.setVolume(0);
this.queue=[];
this.playNext();
}
}
+1
View File
@@ -17,4 +17,5 @@ module.exports = function (bot, api) {
api.respond(message, args[1] + " is not a valid engine name");
}
});
api.registerCommand('flush',()=>api.queue.flush());
}
BIN
View File
Binary file not shown.