From 73ebab839201aaef9d76bfb19fa22c99a76a6b79 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 9 Jan 2022 10:45:51 -0500 Subject: fix level roles --- src/listeners/member-custom/bushLevelUpdate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 { -- cgit