pull/29/head
Matthew 2020-10-22 00:47:17 -04:00
parent 9be8c9da7e
commit 401b1db9fe
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ export default class DelMerchant extends Command {
public async run(message: Message, args: string[]) { public async run(message: Message, args: string[]) {
try { try {
if (!args[0]) return this.client.commands.get('help').run(message, [this.name]); if (!args[0]) return this.client.commands.get('help').run(message, [this.name]);
const merchant = await this.client.db.Merchant.findOne({ _id: args[0] }); const merchant = await this.client.db.Merchant.findOne({ key: args[0] });
if (!merchant) return this.error(message.channel, 'Merchant specified does not exist.'); if (!merchant) return this.error(message.channel, 'Merchant specified does not exist.');
return this.success(message.channel, `Deleted merchant \`${merchant._id}\`.`); return this.success(message.channel, `Deleted merchant \`${merchant._id}\`.`);
} catch (err) { } catch (err) {