diff --git a/src/class/Command.ts b/src/class/Command.ts index 52a46a3..53bc647 100644 --- a/src/class/Command.ts +++ b/src/class/Command.ts @@ -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; diff --git a/src/commands/lock.ts b/src/commands/lock.ts index da90f7f..bc0d47f 100644 --- a/src/commands/lock.ts +++ b/src/commands/lock.ts @@ -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...***`); } diff --git a/src/commands/ping.ts b/src/commands/ping.ts index e9797ee..692041f 100644 --- a/src/commands/ping.ts +++ b/src/commands/ping.ts @@ -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) {