From e4038b467898e6d78da7dda24f9fa7e1958ac448 Mon Sep 17 00:00:00 2001 From: jakeHebert Date: Fri, 16 Aug 2019 15:49:34 -0400 Subject: added validation for Embed author formatting --- bot/seasons/evergreen/recommend_game.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bot') diff --git a/bot/seasons/evergreen/recommend_game.py b/bot/seasons/evergreen/recommend_game.py index 30a538a5..398da376 100644 --- a/bot/seasons/evergreen/recommend_game.py +++ b/bot/seasons/evergreen/recommend_game.py @@ -37,7 +37,8 @@ class RecommendGame(commands.Cog): # Creating and formatting Embed embed = discord.Embed(color=discord.Colour.blue()) - embed.set_author(name=author.name, icon_url=author.avatar_url) + if author is not None: + embed.set_author(name=author.name, icon_url=author.avatar_url) embed.set_image(url=game['image']) embed.add_field(name='Recommendation: ' + game['title'] + '\n' + game['link'], value=game['description']) -- cgit v1.2.3