forked from engineering/cloudservices
Added command enabled status
parent
00301c2de9
commit
61871d7e86
|
@ -24,7 +24,7 @@ export default class Command {
|
|||
this.name = 'None';
|
||||
this.description = 'No description given';
|
||||
this.usage = 'No usage given';
|
||||
this.enabled = false;
|
||||
this.enabled = true;
|
||||
this.aliases = [];
|
||||
this.guildOnly = true;
|
||||
this.client = client;
|
||||
|
|
|
@ -9,11 +9,12 @@ export default class Lock extends Command {
|
|||
this.name = 'lock';
|
||||
this.description = 'Locks an account.';
|
||||
this.permissions = { roles: ['608095934399643649', '521312697896271873'] };
|
||||
this.enabled = true;
|
||||
}
|
||||
|
||||
public async run(message: Message, args: string[]) {
|
||||
public async run(message: Message, args: string[]) { // eslint-disable-line
|
||||
let account = await this.client.db.Account.findOne({ account: args[0] });
|
||||
if (!account) account = await this.client.db.Account.findOne({ userID: args[0] });
|
||||
if (!account) account = await this.client.db.Account.findOne({ userID: args[0].replace(/[<@!>]/gi, '') });
|
||||
if (!account) return message.channel.createMessage(`***${this.client.stores.emojis.error} Cannot find user.***`);
|
||||
const edit = await message.channel.createMessage(`***${this.client.stores.emojis.loading} Locking account...***`);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ export default class Ping extends Command {
|
|||
super(client);
|
||||
this.name = 'ping';
|
||||
this.description = 'Pings the bot';
|
||||
this.enabled = true;
|
||||
}
|
||||
|
||||
public async run(message: Message) {
|
||||
|
|
Loading…
Reference in New Issue