diff --git a/src/commands/authreferral.ts b/src/commands/authreferral.ts index b28530f..dd9cd0d 100644 --- a/src/commands/authreferral.ts +++ b/src/commands/authreferral.ts @@ -22,8 +22,9 @@ export default class AuthReferral extends Command { if (!referred) return this.error(message.channel, 'Cannot find referred member.'); const token = jwt.sign({ staffUserID: message.author.id, referralCode: referrer.referralCode, referrerUserID: referrer.userID, referrerUsername: referrer.username, referredUserID: referred.id, referredUserAndDiscrim: `${referred.username}#${referred.discriminator}` }, this.client.config.keyPair.privateKey, { expiresIn: '24 hours', issuer: 'Library of Code sp-us | Cloud Services Daemon' }); - this.client.getDMChannel(referrer.userID).then((chan) => { - chan.createMessage(`__**Referral Request Authorization**__\nYour referral code has been used in an application recently submitted to us. We need to authorize this request, please visit https://loc.sh/rv and enter the authorization token below. This token expires in 24 hours. If you did not authorize this request, please contact us immediately by DMing Ramirez or opening a ticket at https://loc.sh/cs-help.\n**Referred User:** ${referred.username}#${referred.discriminator} | <@${referred.user.id}>\n\n\`${token}\``); + this.client.getDMChannel(referrer.userID).then(async (chan) => { + await chan.createMessage(`__**Referral Request Authorization**__\nYour referral code has been used in an application recently submitted to us. We need to authorize this request, please visit https://loc.sh/rv and enter the authorization token below. This token expires in 24 hours. If you did not authorize this request, please contact us immediately by DMing Ramirez or opening a ticket at https://loc.sh/cs-help.\n**Referred User:** ${referred.username}#${referred.discriminator} | <@${referred.user.id}>`); + await chan.createMessage(`\`${token}\``); }).catch(() => { this.error(message.channel, 'Could not DM referrer.'); });