33import lombok .Data ;
44import net .dv8tion .jda .api .entities .Guild ;
55import net .dv8tion .jda .api .entities .Role ;
6+ import net .javadiscord .javabot .data .config .BotConfig ;
67import net .javadiscord .javabot .systems .help .model .HelpAccount ;
78import net .javadiscord .javabot .util .ColorUtils ;
89import net .javadiscord .javabot .util .Pair ;
@@ -27,20 +28,21 @@ public class HelpAccountData {
2728 * A simple utility method which creates an instance of this class based on
2829 * the specified {@link HelpAccount}.
2930 *
31+ * @param botConfig configuration of the bot.
3032 * @param account The {@link HelpAccount} to convert.
3133 * @param guild The {@link Guild}.
3234 * @return An instance of the {@link HelpAccountData} class.
3335 */
34- public static @ NotNull HelpAccountData of (@ NotNull HelpAccount account , Guild guild ) {
36+ public static @ NotNull HelpAccountData of (BotConfig botConfig , @ NotNull HelpAccount account , Guild guild ) {
3537 HelpAccountData data = new HelpAccountData ();
3638 data .setExperienceCurrent (account .getExperience ());
37- Pair <Role , Double > previousRank = account .getPreviousExperienceGoal (guild );
39+ Pair <Role , Double > previousRank = account .getPreviousExperienceGoal (botConfig , guild );
3840 if (previousRank != null && previousRank .first () != null ) {
3941 data .setCurrentRank (previousRank .first ().getName ());
4042 data .setCurrentRankColor (ColorUtils .toString (previousRank .first ().getColor ()));
4143 data .setExperiencePrevious (previousRank .second ());
4244 }
43- Pair <Role , Double > nextRank = account .getNextExperienceGoal (guild );
45+ Pair <Role , Double > nextRank = account .getNextExperienceGoal (botConfig , guild );
4446 if (nextRank != null && nextRank .first () != null ) {
4547 data .setNextRank (nextRank .first ().getName ());
4648 data .setNextRankColor (ColorUtils .toString (nextRank .first ().getColor ()));
0 commit comments