Fix Dragon's Stupidity

This commit is contained in:
Daniel Odendahl Jr
2017-10-03 02:08:42 +00:00
parent 05623f724e
commit fa20713398
+2 -2
View File
@@ -45,8 +45,8 @@ module.exports = class SoundboardCommand extends Command {
try {
const connection = await channel.join();
const dispatcher = connection.playFile(path.join(__dirname, '..', '..', 'assets', 'sounds', `${sound}.mp3`));
dispatcher.once('end', channel.leave);
dispatcher.once('error', channel.leave);
dispatcher.once('end', () => channel.leave());
dispatcher.once('error', () => channel.leave());
return null;
} catch (err) {
channel.leave();