1
0
Fork 0

fix get referral

refactor/models
Matthew 2020-08-28 03:07:51 -04:00
parent 99fa3b38bd
commit 4a6db79cef
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,9 @@ export default class AddReferral extends Command {
if (!account) return this.error(message.channel, 'Cannot find user.'); if (!account) return this.error(message.channel, 'Cannot find user.');
await account.updateOne({ $inc: { totalReferrals: 1 } }); await account.updateOne({ $inc: { totalReferrals: 1 } });
this.client.getDMChannel(account.userID).then((chan) => {
chan.createMessage('__**Referral - Application Approval**__\nAn applicant who used your referral code during the application process has been approved. Your referral count has been increased.');
}).catch(() => {});
return this.success(message.channel, 'Added referral value to account.'); return this.success(message.channel, 'Added referral value to account.');
} catch (error) { } catch (error) {
return this.client.util.handleError(error, message, this); return this.client.util.handleError(error, message, this);