1
0
Fork 0

Added command enabled status

refactor/models
Bsian 2019-10-15 23:38:49 +01:00
parent 00301c2de9
commit 61871d7e86
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
3 changed files with 5 additions and 3 deletions

View File

@ -24,7 +24,7 @@ export default class Command {
this.name = 'None'; this.name = 'None';
this.description = 'No description given'; this.description = 'No description given';
this.usage = 'No usage given'; this.usage = 'No usage given';
this.enabled = false; this.enabled = true;
this.aliases = []; this.aliases = [];
this.guildOnly = true; this.guildOnly = true;
this.client = client; this.client = client;

View File

@ -9,11 +9,12 @@ export default class Lock extends Command {
this.name = 'lock'; this.name = 'lock';
this.description = 'Locks an account.'; this.description = 'Locks an account.';
this.permissions = { roles: ['608095934399643649', '521312697896271873'] }; 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] }); 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.***`); 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...***`); const edit = await message.channel.createMessage(`***${this.client.stores.emojis.loading} Locking account...***`);
} }

View File

@ -7,6 +7,7 @@ export default class Ping extends Command {
super(client); super(client);
this.name = 'ping'; this.name = 'ping';
this.description = 'Pings the bot'; this.description = 'Pings the bot';
this.enabled = true;
} }
public async run(message: Message) { public async run(message: Message) {