Skip to content

Commit

Permalink
Merge pull request #4 from dolphin-cat/master
Browse files Browse the repository at this point in the history
Add Missing Roles On Every LevelUp
  • Loading branch information
raluvy95 authored Jan 9, 2025
2 parents be813ea + 43dbef1 commit 8d921b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/levelUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function sendLvlUP(user: string, msg: Message, level: ILevelDB) {
if (roleRewards !== undefined && roleRewards.length > 0) {
const member = await getMemberByID(user);

const itexist = roleRewards.filter((m) => m.level === level?.level);
const itexist = roleRewards.filter((m) => m.level <= level?.level);
if (itexist && itexist.length > 0) {
for (const role of itexist) {
if (member.roles.findIndex((m) => m === role.ID) !== -1)
Expand Down

0 comments on commit 8d921b9

Please sign in to comment.