Implement leveling rewards feature with UI and backend support
- Added functionality to manage role rewards based on user levels in the leveling system. - Updated the LevelingForm component to include fields for defining rewards, including validation for unique levels. - Enhanced backend logic to handle reward data storage and retrieval, ensuring proper integration with the existing leveling configuration. - Introduced localization keys for rewards in both English and German, improving user experience. - Updated dashboard search index to include rewards settings for easier access.
This commit is contained in:
@@ -273,7 +273,7 @@ export async function applyLevelRewards(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const reward = rewards.find((entry) => entry.level === newLevel);
|
||||
const reward = [...rewards].reverse().find((entry) => entry.level <= newLevel);
|
||||
const removable = rewards
|
||||
.map((entry) => entry.roleId)
|
||||
.filter((roleId) => member.roles.cache.has(roleId) && rewardRoleIds.has(roleId));
|
||||
|
||||
Reference in New Issue
Block a user