diff --git a/AudioQueue.js b/AudioQueue.js index 09771f7..970ee93 100644 --- a/AudioQueue.js +++ b/AudioQueue.js @@ -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(); + } } \ No newline at end of file diff --git a/tts/azure/index.js b/azure/index.js similarity index 100% rename from tts/azure/index.js rename to azure/index.js diff --git a/modules/ttsSettings/index.js b/modules/ttsSettings/index.js index 5efcc10..7953a89 100644 --- a/modules/ttsSettings/index.js +++ b/modules/ttsSettings/index.js @@ -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()); } \ No newline at end of file diff --git a/tts/.DS_Store b/tts/.DS_Store index 6d587dd..7477046 100644 Binary files a/tts/.DS_Store and b/tts/.DS_Store differ