diff options
| author | 2022-02-07 18:52:07 -0500 | |
|---|---|---|
| committer | 2022-02-09 18:13:38 -0500 | |
| commit | 88a65659d5c45ed6be54f35245168f6e30192015 (patch) | |
| tree | bd207caf718fb90fe1f0ab8c81c524c86b15e5fc /bot/exts/events/trivianight/_game.py | |
| parent | pagination (diff) | |
fix lists
command
Diffstat (limited to 'bot/exts/events/trivianight/_game.py')
| -rw-r--r-- | bot/exts/events/trivianight/_game.py | 22 | 
1 files changed, 15 insertions, 7 deletions
| diff --git a/bot/exts/events/trivianight/_game.py b/bot/exts/events/trivianight/_game.py index 4b115086..4937e6e3 100644 --- a/bot/exts/events/trivianight/_game.py +++ b/bot/exts/events/trivianight/_game.py @@ -177,14 +177,22 @@ class TriviaNightGame:              - Question description              - Visited/not visited          """ +        question_list = []          formatted_string = "" -        spaces = max(len(q.description) for q in self._all_questions) +        visited = ":white_check_mark:" +        not_visited = ":x:"          for question in self._all_questions: -            visited, not_visited = ":white_check_mark:", ":x:" -            formatted_string += f"`Q{question.number}: {question.description}" \ -                                f"{' ' * (spaces - len(question.description))}|`" \ -                                f" {visited if question not in self._questions else not_visited}\n" - -        return formatted_string +            formatted_string += ( +                f"**Q{question.number}** {not_visited if question in self._questions else visited}" +                f"\n{question.description}\n\n" +            ) +            if question.number % 5 == 0: +                question_list.append(formatted_string.rstrip()) +                formatted_string = "" + +        if formatted_string: +            question_list.append(formatted_string) + +        return question_list | 
