(achievements): Fix bar length.
This commit is contained in:
@@ -31,12 +31,11 @@ class Achievement:
|
|||||||
name: str = None
|
name: str = None
|
||||||
|
|
||||||
subtext: str = None
|
subtext: str = None
|
||||||
congrats_text: str = None
|
congrats_text: str = "Congratulations, you completed this challenge!"
|
||||||
|
|
||||||
# List of levels for the achievement. Must always contain a 0 level!
|
# List of levels for the achievement. Must always contain a 0 level!
|
||||||
levels: list[AchievementLevel] = None
|
levels: list[AchievementLevel] = None
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, guildid: int, userid: int):
|
def __init__(self, guildid: int, userid: int):
|
||||||
self.guildid = guildid
|
self.guildid = guildid
|
||||||
self.userid = userid
|
self.userid = userid
|
||||||
@@ -70,7 +69,8 @@ class Achievement:
|
|||||||
bar.append(str(emojis.progress_middle_transition))
|
bar.append(str(emojis.progress_middle_transition))
|
||||||
|
|
||||||
# Empty sections up to end
|
# Empty sections up to end
|
||||||
bar.append(str(emojis.progress_middle_empty) * (width - max(sections, 1)))
|
if sections < width:
|
||||||
|
bar.append(str(emojis.progress_middle_empty) * (width - max(sections, 1) - 1))
|
||||||
|
|
||||||
# End section
|
# End section
|
||||||
bar.append(str(emojis.progress_right_empty) if sections < width else str(emojis.progress_right_full))
|
bar.append(str(emojis.progress_right_empty) if sections < width else str(emojis.progress_right_full))
|
||||||
|
|||||||
Reference in New Issue
Block a user