1
0
Fork 0

fix get referral

refactor/models
Matthew 2020-08-28 03:20:25 -04:00
parent d059d430d2
commit 8feb9dddb9
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ export default class Whois extends Command {
if (args[1] === '--full' && this.fullRoles.some((r) => message.member.roles.includes(r))) full = true;
const user = args[0] || message.author.id;
if (full) account = await this.client.db.Account.findOne({ $or: [{ username: user }, { userID: user }, { emailAddress: user }, { supportKey: user.toUpperCase() }] });
if (full) account = await this.client.db.Account.findOne({ $or: [{ username: user }, { userID: user }, { emailAddress: user }, { supportKey: user.toUpperCase() }, { referralCode: args[0] }] });
else account = await this.client.db.Account.findOne({ $or: [{ username: user }, { userID: user }] });
if (!account) return this.error(message.channel, 'Account not found.');