Implement queue flush
parent
4a37af0795
commit
c6c370d22b
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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());
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue