Defxult / discordLevelingSystem

A library to implement a leveling system into a discord bot. Contains features such as XP, level, ranks, and role awards.
MIT License
91 stars 17 forks source link

[Feature Request] Add DiscordLevelingSystem.get_xp_for_level() #10

Closed xFGhoul closed 2 years ago

xFGhoul commented 2 years ago

I don't know if this is possible or not but this method would return an int based on the amount of xp needed for a level

It's similar to next_level_up() but instead of returning the remaining amount it returns the total amount

Example:

xp_needed_for_level_2 = await DiscordLevelingSystem.get_xp_for_level(2)
print(xp_needed_for_level_2)
# >>> 200 (Example int)
Dinkytora commented 2 years ago

I support this idea, would be a really good utility method

Defxult commented 2 years ago

Surprised I never added this. Thanks for the request! It has been added to the library.