From 63db3ba1bece20d68c5622d6eff48809399ffad8 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 3 Jan 2021 17:16:05 -0500 Subject: [PATCH] added handling for teams without slogans --- the_prestige.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/the_prestige.py b/the_prestige.py index 46adffb..817e95f 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -924,7 +924,10 @@ async def team_pages(msg, all_teams, search_term=None): embed.set_footer(text = f"Page {page+1} of {page_max}") for i in range(0,25): try: - embed.add_field(name=all_teams[i+25*page].name, value=all_teams[i+25*page].slogan) + if all_teams[i+25*page].slogan.strip() != "": + embed.add_field(name=all_teams[i+25*page].name, value=all_teams[i+25*page].slogan) + else: + embed.add_field(name=all_teams[i+25*page].name, value="404: Slogan not found") except: break pages.append(embed)