Skip to content

Commit

Permalink
update: roles (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustDams authored Mar 10, 2023
1 parent 77107f7 commit 84fca6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions/roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const setupRoles = async (users, data, remove) => {
user = user.flat().at(0)

const playerDatas = await Player.getDatas(user.faceitId).catch(console.error)

if (!playerDatas?.games?.csgo) return

const playerLevel = playerDatas.games.csgo.skill_level
const roleLevels = getRoleIds(guildRoles)

Expand Down Expand Up @@ -54,4 +57,4 @@ const updateRoles = async (client, discordId, guildId, remove = false) => {

module.exports = {
updateRoles
}
}

0 comments on commit 84fca6d

Please sign in to comment.