From d3630feef9a97a9807cdb91c82ca758a6a490fcb Mon Sep 17 00:00:00 2001 From: Supositware Date: Fri, 18 Jan 2019 22:33:50 +0100 Subject: [PATCH] someone send help --- commands/general/ttsvc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/general/ttsvc.js b/commands/general/ttsvc.js index 39fda1d..ee5e25d 100644 --- a/commands/general/ttsvc.js +++ b/commands/general/ttsvc.js @@ -56,7 +56,10 @@ class TtsvcCommand extends Command { if (message.member.voice.channel) { const connection = await message.member.voice.channel.join(); - connection.play('../../ttsvc'); + const dispatcher = connection.play('../../ttsvc.mp3'); + dispatcher.on('finish', () => { + dispatcher.destroy(); + }); } else { message.reply('You need to join a voice channel first!'); }