From dd803da047fd14dae83b1080c18d79606202f3e0 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 30 Aug 2020 22:23:26 -0400 Subject: [PATCH] fixes --- src/commands/authreferral.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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.'); });