forked from engineering/cloudservices
Added error catcher
parent
384adae1de
commit
e283251e68
|
@ -16,6 +16,7 @@ export default class Help extends Command {
|
||||||
util: Util = new Util(this.client);
|
util: Util = new Util(this.client);
|
||||||
|
|
||||||
public async run(message: Message, args?: string[]) {
|
public async run(message: Message, args?: string[]) {
|
||||||
|
try {
|
||||||
const cmd = args.filter((c) => c)[0];
|
const cmd = args.filter((c) => c)[0];
|
||||||
if (!cmd) {
|
if (!cmd) {
|
||||||
const cmdList: Command[] = [];
|
const cmdList: Command[] = [];
|
||||||
|
@ -61,5 +62,8 @@ export default class Help extends Command {
|
||||||
embed.setDescription(description);
|
embed.setDescription(description);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return message.channel.createMessage({ embed });
|
return message.channel.createMessage({ embed });
|
||||||
|
} catch (error) {
|
||||||
|
this.util.handleError(error, message, this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue