Skip to content

Commit

Permalink
4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
FAXES authored Feb 27, 2022
1 parent b637f44 commit 56c0fe3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,15 @@ on('playerConnecting', async (name, setKickReason, deferrals) => {
Authorization: `Bot ${botToken}`
},
}).catch(async (err) => {
console.error(JSON.stringify(err))
if(debugMode) console.error(JSON.stringify(err))
if(debugMode) console.log(`[${version}] ^5${name} is not in the guild.^7`)
return deferrals.done(noGuildMessage);
});
if(!resDis) {
cache[userId] = {passed: 0,roles: null,timeAt: Date.now() + ms(cacheMaxTime)}
if(debugMode) console.log(`[${version}] ^5Error in Discord call. Maybe consider extending the 'cacheMaxTime' option.^7`)
return deferrals.done('There was an error checking your Discord Id. Please contact the server owner.');
}
if(!resDis.data) {
cache[userId] = {passed: 0,roles: null,timeAt: Date.now() + ms(cacheMaxTime)}
if(debugMode) console.log(`[${version}] ^5${name} is not in the guild. Cache created^7`)
Expand Down Expand Up @@ -236,4 +241,4 @@ exports('getName', (src) => {
}
});
});
});
});

0 comments on commit 56c0fe3

Please sign in to comment.