Previously, a member ranking up would keep their current accumulated experience from the previous ranks. This would throw off the experience bar percentage as it was carrying over that experience into the progress towards the next rank up.
This fix resets the member's experience total to 0 at each rank up.
Solution
Add
users[f'{user.id}']['experience'] = 0
to end offam_up() method.
Notes
Other changes:
moved famDict to rankings.py with the other structs
most of the other changes are from running a format on the project
might want to keep a lookout on FamRankings.py's line 134:
if rank_end >= 3 and users[f'{user.id}']['is_fam'] == False:
[...]
famDict['isfam'].append(user.name)
[...]
to make sure it doesn't add the user multiple times at each rank up. Seems like it will but I'm lazy lol
Description
Previously, a member ranking up would keep their current accumulated experience from the previous ranks. This would throw off the experience bar percentage as it was carrying over that experience into the progress towards the next rank up.
This fix resets the member's experience total to 0 at each rank up.
Solution
Add
to end of
fam_up()
method.Notes
Other changes:
famDict
torankings.py
with the other structs