Java-Discord/JavaBot

NullPointerException: Cannot invoke "net.javadiscord.javabot.util.Pair.second()" because the return value of "net.javad...

sentry-io opened this issue · 0 comments

When the command /help account is invoked with a user that is not in the guild does not have a rank, a NullPointerException is thrown.

Sentry Issue: JAVA-BOT-1V

NullPointerException: Cannot invoke "net.javadiscord.javabot.util.Pair.second()" because the return value of "net.javadiscord.javabot.systems.help.model.HelpAccount.getPreviousExperienceGoal(net.dv8tion.jda.api.entities.Guild)" is null
    at net.javadiscord.javabot.systems.help.commands.HelpAccountSubcommand.formatExperience(HelpAccountSubcommand.java:91)
    at net.javadiscord.javabot.systems.help.commands.HelpAccountSubcommand.buildHelpAccountEmbed(HelpAccountSubcommand.java:70)
    at net.javadiscord.javabot.systems.help.commands.HelpAccountSubcommand.execute(HelpAccountSubcommand.java:56)
    at com.dynxsty.dih4jda.InteractionHandler.handleSlashCommand(InteractionHandler.java:437)
    at com.dynxsty.dih4jda.InteractionHandler.lambda$onSlashCommandInteraction$6(InteractionHandler.java:526)
...
(7 additional frame(s) were not displayed)