Implement queue flush

pull/1/head
guilevi 2021-04-09 16:21:31 +02:00
parent 4a37af0795
commit c6c370d22b
4 changed files with 6 additions and 0 deletions

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();
}
}

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
tts/.DS_Store vendored

Binary file not shown.