diff options
| author | 2019-08-15 17:49:04 -0400 | |
|---|---|---|
| committer | 2019-08-15 17:49:04 -0400 | |
| commit | 6db0d45b7814379907d1cfa36fabf0c62c385cea (patch) | |
| tree | 516e527c47e7136e09f4ec302da9f68cbe2735d9 /bot/seasons/evergreen/recommend_game.py | |
| parent | edited json files, added new resource, small tweaks to Embed (diff) | |
edited json files, added new resource, small tweaks to Embed
Diffstat (limited to 'bot/seasons/evergreen/recommend_game.py')
| -rw-r--r-- | bot/seasons/evergreen/recommend_game.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/bot/seasons/evergreen/recommend_game.py b/bot/seasons/evergreen/recommend_game.py index e4ad5392..45864336 100644 --- a/bot/seasons/evergreen/recommend_game.py +++ b/bot/seasons/evergreen/recommend_game.py @@ -27,22 +27,18 @@ class RecommendGame(commands.Cog): game = game_recs.pop() else: game = game_recs.pop() - - embed = discord.Embed( - title=game['title'], - url=game['wikiLink'], - color=discord.Colour.blue() - ) - author = self.bot.get_user(int(game['author'])) + + # Creating and formatting Embed + embed = discord.Embed(color=discord.Colour.blue()) embed.set_author(name=author.name, icon_url=author.avatar_url) embed.set_image(url=game['image']) - embed.add_field(name="Recommendation", value=game['recText']) + embed.add_field(name='Recommendation: ' + game['title'] + '\n' + game['wikiLink'], value=game['recText']) await ctx.send(embed=embed) def populate_recs(self): - """Populates the game_recs list from resources.""" + """Populates the list `game_recs` from resources.""" for file_url in os.listdir(DIR): with Path(DIR, file_url).open(encoding='utf-8') as file: data = json.load(file) |