aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-19 16:48:17 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-19 16:48:17 -0400
commitd29be9345dedefa08e7ae4073cd07c5ac9a661d4 (patch)
tree52b1b3cffbf28b87f1880a74c74bc02696277f22 /src/commands
parentc486d655de34c0827ef2614733af289be5139bc3 (diff)
downloadtanzanite-d29be9345dedefa08e7ae4073cd07c5ac9a661d4.tar.gz
tanzanite-d29be9345dedefa08e7ae4073cd07c5ac9a661d4.tar.bz2
tanzanite-d29be9345dedefa08e7ae4073cd07c5ac9a661d4.zip
fix leveling
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/dev/reload.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts
index 928632c..4898ad3 100644
--- a/src/commands/dev/reload.ts
+++ b/src/commands/dev/reload.ts
@@ -35,14 +35,16 @@ export default class ReloadCommand extends BushCommand {
if (!message.author.isOwner())
return await message.util.reply(`${this.client.util.emojis.error} Only my developers can run this command.`);
+ let output: { stdout: string; stderr: string; };
try {
const s = new Date();
- await this.client.util.shell(`yarn build-${fast ? 'esbuild' : 'tsc'}`);
+ output = await this.client.util.shell(`yarn build-${fast ? 'esbuild' : 'tsc'}`);
this.client.commandHandler.reloadAll();
this.client.listenerHandler.reloadAll();
this.client.inhibitorHandler.reloadAll();
return message.util.send(`🔁 Successfully reloaded! (${new Date().getTime() - s.getTime()}ms)`);
} catch (e) {
+ if (output) await this.client.logger.error('reloadCommand', output)
return message.util.send(
`An error occurred while reloading:\n${await this.client.util.codeblock(e?.stack || e, 2048 - 34, 'js')}`
);