diff options
author | 2020-10-02 18:02:34 +0530 | |
---|---|---|
committer | 2020-10-02 18:02:34 +0530 | |
commit | e949e54f0e0d3a3d5233799e837b12505d38ad5e (patch) | |
tree | eaa23d45a1f73037e525ea6f9a1052572f52140b | |
parent | modified error message (diff) |
modified error message
-rw-r--r-- | bot/exts/valentines/valentine_zodiac.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bot/exts/valentines/valentine_zodiac.py b/bot/exts/valentines/valentine_zodiac.py index 3049540d..2696999f 100644 --- a/bot/exts/valentines/valentine_zodiac.py +++ b/bot/exts/valentines/valentine_zodiac.py @@ -45,9 +45,11 @@ class ValentineZodiac(commands.Cog): embed = discord.Embed() embed.color = Colours.soft_red error_msg = f"**{zodiac}** is not a valid zodiac sign, here is the list of valid zodiac signs.\n" - first_part_of_valid_name_list = ", ".join(name for name in list(self.zodiac_fact.keys())[:7]) - end_part_of_valid_name_list = ", ".join(name for name in list(self.zodiac_fact.keys())[7:]) - embed.description = error_msg + first_part_of_valid_name_list + ",\n" + end_part_of_valid_name_list + names = list(self.zodiac_fact) + middle_index = len(names) // 2 + first_half_names = ", ".join(names[:middle_index]) + second_half_names = ", ".join(names[middle_index:]) + embed.description = error_msg + first_half_names + ",\n" + second_half_names log.info("Invalid zodiac name provided.") return embed |