diff --git a/src/main/java/de/voidtech/gerald/commands/utils/ExperienceCommand.java b/src/main/java/de/voidtech/gerald/commands/utils/ExperienceCommand.java index 1dc9a608..6995b9b7 100644 --- a/src/main/java/de/voidtech/gerald/commands/utils/ExperienceCommand.java +++ b/src/main/java/de/voidtech/gerald/commands/utils/ExperienceCommand.java @@ -214,8 +214,8 @@ private void sendLevelCard(CommandContext context, Member member, long serverID) byte[] xpCard = xpService.getExperienceCard(member.getUser().getAvatarUrl(), userXP.getCurrentExperience(), xpService.xpNeededForLevel(userXP.getNextLevel()), - userXP.getCurrentLevel(), 1, member.getUser().getName() + "#" + member.getUser().getDiscriminator(), - "#FF0000", "#2E2E2E"); + userXP.getCurrentLevel(), 1, member.getUser().getName(), member.getUser().getDiscriminator(), "#F24548", + "#3B43D5", "#2F3136"); context.replyWithFile(xpCard, "xpcard.png"); } diff --git a/src/main/java/de/voidtech/gerald/service/ExperienceService.java b/src/main/java/de/voidtech/gerald/service/ExperienceService.java index 89037962..1c21adac 100644 --- a/src/main/java/de/voidtech/gerald/service/ExperienceService.java +++ b/src/main/java/de/voidtech/gerald/service/ExperienceService.java @@ -43,12 +43,15 @@ public class ExperienceService { private static final int EXPERIENCE_DELAY = 0; //Delay between incrementing XP in seconds public byte[] getExperienceCard(String avatarURL, long xpAchieved, long xpNeeded, - long level, long rank, String username, String barColour, String background) { + long level, long rank, String username, String discriminator, String barFromColour, + String barToColour, String background) { try { String cardURL = config.getExperienceCardApiURL() + "xpcard/?avatar_url=" + avatarURL + "&xp=" + xpAchieved + "&xp_needed=" + xpNeeded + "&level=" + level + "&rank=" + rank + "&username=" + URLEncoder.encode(username, StandardCharsets.UTF_8.toString()) - + "&bar_colour=" + URLEncoder.encode(barColour, StandardCharsets.UTF_8.toString()) + + "&discriminator=" + URLEncoder.encode(discriminator, StandardCharsets.UTF_8.toString()) + + "&bar_colour_from=" + URLEncoder.encode(barFromColour, StandardCharsets.UTF_8.toString()) + + "&bar_colour_to=" + URLEncoder.encode(barToColour, StandardCharsets.UTF_8.toString()) + "&bg_colour=" + URLEncoder.encode(background, StandardCharsets.UTF_8.toString()); URL url = new URL(cardURL); //Remove the data:image/png;base64 part