2019-10-20 19:28:35 -04:00
|
|
|
import { Message } from 'eris';
|
2019-11-16 10:09:41 -05:00
|
|
|
import { Command } from '../class';
|
2019-10-28 17:29:06 -04:00
|
|
|
import { Client } from '..';
|
2019-10-31 19:17:34 -04:00
|
|
|
import Create from './cwg_create';
|
|
|
|
import Data from './cwg_data';
|
|
|
|
import Delete from './cwg_delete';
|
2019-12-30 11:40:23 -05:00
|
|
|
import UpdateCert from './cwg_updatecert';
|
2019-10-20 19:28:35 -04:00
|
|
|
|
|
|
|
export default class CWG extends Command {
|
|
|
|
constructor(client: Client) {
|
|
|
|
super(client);
|
|
|
|
this.name = 'cwg';
|
|
|
|
this.description = 'Manages aspects for the CWG.';
|
2019-11-01 11:07:21 -04:00
|
|
|
this.usage = `Run ${this.client.config.prefix}${this.name} [subcommand] for usage information`;
|
2019-10-29 16:01:21 -04:00
|
|
|
this.permissions = { roles: ['446104438969466890'] };
|
2019-12-30 11:40:23 -05:00
|
|
|
this.subcmds = [Create, Data, Delete, UpdateCert];
|
2019-10-20 19:28:35 -04:00
|
|
|
this.enabled = true;
|
|
|
|
}
|
|
|
|
|
2019-10-31 19:17:34 -04:00
|
|
|
public async run(message: Message) {
|
2019-10-28 17:41:23 -04:00
|
|
|
try {
|
2019-10-31 19:17:34 -04:00
|
|
|
return this.client.commands.get('help').run(message, [this.name]);
|
2019-10-28 17:41:23 -04:00
|
|
|
} catch (error) {
|
|
|
|
return this.client.util.handleError(error, message, this);
|
|
|
|
}
|
2019-10-20 19:28:35 -04:00
|
|
|
}
|
|
|
|
}
|