diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-09 10:45:51 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-09 10:45:51 -0500 |
commit | 73ebab839201aaef9d76bfb19fa22c99a76a6b79 (patch) | |
tree | 3718674ec1e53d1903427aa2ee07bc4af8a4cccd | |
parent | e26413dde461729694c36a92e01970df15eb68a5 (diff) | |
download | tanzanite-73ebab839201aaef9d76bfb19fa22c99a76a6b79.tar.gz tanzanite-73ebab839201aaef9d76bfb19fa22c99a76a6b79.tar.bz2 tanzanite-73ebab839201aaef9d76bfb19fa22c99a76a6b79.zip |
fix level roles
-rw-r--r-- | src/listeners/member-custom/bushLevelUpdate.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/listeners/member-custom/bushLevelUpdate.ts b/src/listeners/member-custom/bushLevelUpdate.ts index 6299a36..d0dc4a5 100644 --- a/src/listeners/member-custom/bushLevelUpdate.ts +++ b/src/listeners/member-custom/bushLevelUpdate.ts @@ -28,10 +28,10 @@ export default class BushLevelUpdateListener extends BushListener { const levelRoles = await message.guild.getSetting('levelRoles'); if (Object.keys(levelRoles).length) { const promises = []; - for (let i = 0; i < newLevel; i++) { + for (let i = 1; i <= newLevel; i++) { if (levelRoles[i]) { if (member.roles.cache.has(levelRoles[i])) continue; - else promises.push(member.roles.add(levelRoles[i])); + else promises.push(member.roles.add(levelRoles[i], `[LevelRoles] Role given for reaching level ${i}`)); } } try { |