Fix no args
parent
495159336b
commit
af1827337f
|
@ -2,7 +2,7 @@ import { Message } from 'eris';
|
||||||
import { Client } from '..';
|
import { Client } from '..';
|
||||||
import { Command } from '../class';
|
import { Command } from '../class';
|
||||||
|
|
||||||
export default class Ping extends Command {
|
export default class Load extends Command {
|
||||||
constructor(client: Client) {
|
constructor(client: Client) {
|
||||||
super(client);
|
super(client);
|
||||||
this.name = 'load';
|
this.name = 'load';
|
||||||
|
@ -27,6 +27,7 @@ export default class Ping extends Command {
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const Cmd = require(`${corepath}/commands`)[args[1]];
|
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.commands.remove(args[1]);
|
||||||
this.client.loadCommand(Cmd);
|
this.client.loadCommand(Cmd);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue