aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/recommend_game.py
diff options
context:
space:
mode:
authorGravatar ToxicKidz <[email protected]>2021-05-04 12:57:03 -0400
committerGravatar ToxicKidz <[email protected]>2021-05-04 12:57:03 -0400
commita6cc40ff3b323dff112d7f8c339e124f3a6d9980 (patch)
treef0cdec46d302cfc629fe9277df5cfbe6251a861b /bot/exts/evergreen/recommend_game.py
parentchore: Don't return a Message object when the return annotation is None (diff)
chore: Prefer double quotes over single quotes
Diffstat (limited to 'bot/exts/evergreen/recommend_game.py')
-rw-r--r--bot/exts/evergreen/recommend_game.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/exts/evergreen/recommend_game.py b/bot/exts/evergreen/recommend_game.py
index be329f44..340a42d3 100644
--- a/bot/exts/evergreen/recommend_game.py
+++ b/bot/exts/evergreen/recommend_game.py
@@ -13,7 +13,7 @@ game_recs = []
# Populate the list `game_recs` with resource files
for rec_path in Path("bot/resources/evergreen/game_recs").glob("*.json"):
- with rec_path.open(encoding='utf8') as file:
+ with rec_path.open(encoding="utf8") as file:
data = json.load(file)
game_recs.append(data)
shuffle(game_recs)
@@ -26,7 +26,7 @@ class RecommendGame(commands.Cog):
self.bot = bot
self.index = 0
- @commands.command(name="recommendgame", aliases=['gamerec'])
+ @commands.command(name="recommendgame", aliases=["gamerec"])
async def recommend_game(self, ctx: commands.Context) -> None:
"""Sends an Embed of a random game recommendation."""
if self.index >= len(game_recs):
@@ -35,14 +35,14 @@ class RecommendGame(commands.Cog):
game = game_recs[self.index]
self.index += 1
- author = self.bot.get_user(int(game['author']))
+ author = self.bot.get_user(int(game["author"]))
# Creating and formatting Embed
embed = discord.Embed(color=discord.Colour.blue())
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'])
+ embed.set_image(url=game["image"])
+ embed.add_field(name="Recommendation: " + game["title"] + "\n" + game["link"], value=game["description"])
await ctx.send(embed=embed)