From baf391762067e7fda64164fc3bf09b34c9ab9fac Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Mon, 2 Oct 2017 13:54:53 +0000 Subject: [PATCH] Beep --- commands/text-edit/dec-talk.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/text-edit/dec-talk.js b/commands/text-edit/dec-talk.js index a86337e5..a2e583d2 100644 --- a/commands/text-edit/dec-talk.js +++ b/commands/text-edit/dec-talk.js @@ -49,11 +49,11 @@ module.exports = class DECTalkCommand extends Command { await fs.writeFileAsync(file, body, { encoding: 'binary' }); await msg.react('🔉'); const dispatcher = connection.playFile(file); - dispatcher.once('end', async () => this.finish(file, channel, msg)); - dispatcher.once('error', async () => this.finish(file, channel, msg, true)); + dispatcher.once('end', () => this.finish(file, channel, msg)); + dispatcher.once('error', () => this.finish(file, channel, msg, true)); return null; } catch (err) { - this.finish(file, channel, msg, true); + await this.finish(file, channel, msg, true); return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } }