diff --git a/src/index.js b/src/index.js index 656ea0c..1ff2c24 100644 --- a/src/index.js +++ b/src/index.js @@ -48,12 +48,14 @@ client.on('ready', async () => { defaultPrefix: process.env.COMMAND_PREFIX }); + console.log(`Logged in as ${client.user.tag}!`); + verificationQueueProcessor.startProcessing(client); }) client.on('voiceStateUpdate', (oldMember, newMember) => { WatchController.handleEvent(oldMember, newMember); - }) +}) client.on('messageCreate', (message) => { if(message.channel.id === process.env.VERIFICATION_CHANNEL_ID){ @@ -71,6 +73,8 @@ client.on('messageCreate', (message) => { client.on('guildMemberAdd', async (member) => { let userInfo + + console.log(member.user.tag + " joined the server"); try { userInfo = await UserController.getUserByDiscordID(member.id) @@ -79,8 +83,10 @@ client.on('guildMemberAdd', async (member) => { } if (userInfo) { + console.log(`${member.user.tag} is linked to ${userInfo.email}`); try { member.setNickname(userInfo.firstName + " " + userInfo.lastName); + console.log(`${member.user.tag} nickname set to ${userInfo.firstName} ${userInfo.lastName}`); } catch (e) { console.log(e); } diff --git a/src/services/verificationQueueProcessor.js b/src/services/verificationQueueProcessor.js index 120cfe0..ef270f1 100644 --- a/src/services/verificationQueueProcessor.js +++ b/src/services/verificationQueueProcessor.js @@ -17,7 +17,7 @@ VerificationQueueProcessor.startProcessing = function(client) { } } catch(e) { - console.error("Error while processing verification queue", e); + console.error("Error while processing verification queue."); if(e.code === 10007) { console.error("Member is no longer in server. Skipping.") } @@ -30,7 +30,7 @@ VerificationQueueProcessor.startProcessing = function(client) { } } catch(e) { - console.error("Unable to fetch/update verification queue.", e); + console.error("Unable to fetch/update verification queue."); }