don't remove birthdays for members that have left
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 36s

This commit is contained in:
Lee
2024-07-01 15:20:49 +01:00
parent be7f8a9057
commit c1f9bfec6a
2 changed files with 1 additions and 31 deletions

View File

@ -31,12 +31,6 @@ public class BirthdayFeature extends Feature implements EventListener {
registerCommand(commandService, context.getBean(BirthdayCommand.class));
}
@Override
public void onGuildMemberLeave(@NonNull BatGuild guild, @NonNull BatUser user, @NonNull GuildMemberRemoveEvent event) {
BirthdayProfile profile = guild.getBirthdayProfile();
profile.removeBirthday(user.getId());
}
/**
* Check birthdays every day at midnight
*/
@ -49,7 +43,6 @@ public class BirthdayFeature extends Feature implements EventListener {
}
BirthdayProfile profile = batGuild.getBirthdayProfile();
profile.checkBirthdays(batGuild);
}
}
}