Skip to content

Commit

Permalink
fix(command): Fixed broken XP issue (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seb committed Apr 14, 2022
1 parent 455fbe3 commit 41140c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private void sendLevelCard(MessageChannel channel, Member member, long serverID)
Experience userXP = xpService.getUserExperience(member.getId(), serverID);

byte[] xpCard = xpService.getExperienceCard(member.getUser().getAvatarUrl(),
userXP.getCurrentExperience(), xpService.xpNeededForLevel(userXP.getLevel()),
userXP.getCurrentExperience(), xpService.xpNeededForLevel(userXP.getLevel() + 1),
userXP.getLevel(), 1, member.getUser().getName() + "#" + member.getUser().getDiscriminator(),
"#FF0000", "#2E2E2E");
channel.sendFile(xpCard, "xpcard.png").queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public boolean serverHasRoleForLevel(long id, long level) {
}

private void saveUserExperience(Experience userXP) {
System.out.println("Saving user XP");
try(Session session = sessionFactory.openSession())
{
session.getTransaction().begin();
Expand Down

0 comments on commit 41140c4

Please sign in to comment.