You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constverificationTimeout='Uh-oh, it looks like you weren\'t able to get the right verification code back to me in time. I\'ve contacted the Armada admins so we can get this straightened out right away.';
83
+
constverificationTimeout=`!verify timeout. Clap ${collected.author.username} in irons! Let's see how well they dance on the plank!`;
91
84
util.log('Items',collected.size,3);
92
85
if(collected.size===0){
93
86
// TODO: ping admin team on verification fail
@@ -105,15 +98,15 @@ module.exports = () => {
105
98
// Nodemailer email recipient & message
106
99
// TODO: Build email template
107
100
constmailOptions={
108
-
from: 'max-bot@apextion.com',
101
+
from: process.env.EMAIL_USERNAME,
109
102
to: email,
110
103
subject: 'Armada Verification Code',
111
-
html: `<table><tr><td><p>Copy and paste this into Discord!</p></td></tr><tr><td><p>Verification Code: ${code}</p></td></tr></table>`,
104
+
html: `<table><tr><td><p>Enter the code below into Discord, in the same channel on the Armada Server. Verification will timeout after ${(timeoutInMiliseconds/1000)/60} minutes from first entering the !verify command.</p></td></tr><tr><td><h2>Verification Code: ${code}</h2></td></tr></table>`,
112
105
};
113
106
// Call sendMail on sendVerifyCode
114
107
// Pass mailOptions & callback function
115
108
sendVerifyCode.sendMail(mailOptions,(err,info)=>{
116
-
consterrorMsg='Oops, looks like the email can not be sent. Its not you, it\'s me. Please contact a moderator and let them know I have failed.';
109
+
consterrorMsg='Oops, looks like the email can not be sent. It\'s not you, it\'s me. Please reach out to a moderator to help you verify.';
117
110
if(err){
118
111
message.reply(errorMsg);
119
112
util.log('Email not sent',err,3);
@@ -123,7 +116,7 @@ module.exports = () => {
123
116
});
124
117
125
118
util.log('Code',code,3);
126
-
return`Hi there, ${message.author.username}, it looks like you're trying to verify your email address!\n\nBeep boop... generating verification code... beep boop\n\nI've emailed a ${codeLength}-digit number to _${email}_. Respond back with that number within 10 minutes and I'll automagically verify your email address so you can represent the glorious Full Sail Armada!`;
119
+
return`...What's the passcode? \n\n *eyes you suspicously*\n\n I just sent it to your email, just respond back to this channel within ${(timeoutInMiliseconds/1000)/60} minutes, with the code, and I won't treat you like a scurvy cur!`;
127
120
}else{
128
121
return`Sorry, ${message.author.username}, I can only verify Full Sail University email addresses.`;
Max uses [Nodemailer](https://nodemailer.com/about/) to send verification emails to users joining the Armada server. to work proper locally please follow these steps to create a new gmail account to locally test with:
66
+
67
+
1. Create a new gmail.com account
68
+
2. Once logged in with this account enable [less secure application access](https://myaccount.google.com/u/1/lesssecureapps?pageId=none&pli=1).
69
+
3. fill in the ```EMAIL_USERNAME``` & ```EMAIL_PASS``` values on the ```.env``` file with this new gmail account's info.
70
+
71
+
63
72
# Running the Bot
64
73
65
74
## Local
@@ -141,12 +150,6 @@ You can find more information about the config file `db/config/config.json`
0 commit comments