aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/listeners/member-custom/bushLevelUpdate.ts4
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 {