Removed duplicate call to discord.getGuildMember()

Co-authored-by: Tymoteusz Boba <Tymoteusz.Boba@gmail.com>
pull/6323/head
TomDakan 2 years ago committed by GitHub
parent 7c4f4faf38
commit f183995325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -23,7 +23,6 @@ module.exports = {
}, async (req, accessToken, refreshToken, profile, cb) => { }, async (req, accessToken, refreshToken, profile, cb) => {
try { try {
if (conf.roles) { if (conf.roles) {
const memberRoles = await discord.getGuildMember(accessToken, conf.guildId)
const authRoles = conf.roles.split(); const authRoles = conf.roles.split();
const { roles } = await discord.getGuildMember(accessToken, conf.guildId); const { roles } = await discord.getGuildMember(accessToken, conf.guildId);
if (authRoles.every(role => roles.includes(role)) if (authRoles.every(role => roles.includes(role))

Loading…
Cancel
Save