From af1827337f9c3c2c58342a90df48b43c53a70120 Mon Sep 17 00:00:00 2001 From: Bsian Date: Sat, 30 Nov 2019 23:59:13 +0000 Subject: [PATCH] Fix no args --- src/commands/load.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/load.ts b/src/commands/load.ts index ec22ab3..fe5f340 100644 --- a/src/commands/load.ts +++ b/src/commands/load.ts @@ -2,7 +2,7 @@ import { Message } from 'eris'; import { Client } from '..'; import { Command } from '../class'; -export default class Ping extends Command { +export default class Load extends Command { constructor(client: Client) { super(client); this.name = 'load'; @@ -27,6 +27,7 @@ export default class Ping extends Command { } else { try { const Cmd = require(`${corepath}/commands`)[args[1]]; + if (!Cmd) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Could not find file***`); this.client.commands.remove(args[1]); this.client.loadCommand(Cmd); } catch (error) {