From 9cd308d93ae88614ceaed2365a5ecf71d2898d70 Mon Sep 17 00:00:00 2001 From: Conatum Date: Fri, 28 Jan 2022 18:08:33 +0200 Subject: [PATCH] (achievements): Reduce bar size. --- bot/modules/stats/achievements.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/modules/stats/achievements.py b/bot/modules/stats/achievements.py index d74de14d..c687201f 100644 --- a/bot/modules/stats/achievements.py +++ b/bot/modules/stats/achievements.py @@ -42,14 +42,14 @@ class Achievement: self.level_id: int = None @staticmethod - def progress_bar(value, minimum, maximum, width=15) -> str: + def progress_bar(value, minimum, maximum, width=10) -> str: """ Build a text progress bar representing `value` between `minimum` and `maximum`. """ emojis = conf.emojis proportion = (value - minimum) / (maximum - minimum) - sections = max(int(proportion * width), 0) + sections = min(max(int(proportion * width), 0), width) bar = [] # Starting segment