From 10d2fbb374c15387cefdb466eae4457679e69889 Mon Sep 17 00:00:00 2001 From: Bsian Date: Tue, 12 May 2020 17:32:46 +0100 Subject: [PATCH] This is a bodge fix --- src/class/Util.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index 829f496..d4fece4 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -41,13 +41,12 @@ export default class Util { cmd.stdout.on('data', writeFunction); cmd.stderr.on('data', writeFunction); cmd.on('error', writeFunction); - cmd.on('error', (e) => this.client.getDMChannel('253600545972027394').then((c) => c.createMessage(inspect(e, { depth: 0 })))); cmd.once('close', (code, signal) => { cmd.stdout.off('data', writeFunction); cmd.stderr.off('data', writeFunction); cmd.off('error', writeFunction); setTimeout(() => {}, 1000); - if (code !== 0) rej(new Error(output)); + if (code !== 0) rej(new Error(`Command failed: ${command}\n${output}`)); res(output); }); });