diff options
author | 2020-03-04 09:22:41 +0200 | |
---|---|---|
committer | 2020-03-04 09:22:41 +0200 | |
commit | d89c37462b1917ea45dfa082a7b7b1daa09e4baa (patch) | |
tree | 27137bbd42b106d36b075a0a5386b6eb86deb7e8 | |
parent | (Games Cog): Fixed get_games_list calling formatting at L192 (diff) |
(Games Cog): Fixed _get_genres function looping over genres (started using dict.items())
-rw-r--r-- | bot/seasons/evergreen/game.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/seasons/evergreen/game.py b/bot/seasons/evergreen/game.py index 7a7dc02f..8f55a1f3 100644 --- a/bot/seasons/evergreen/game.py +++ b/bot/seasons/evergreen/game.py @@ -157,12 +157,12 @@ class Games(Cog): self.genres = {} # Replace complex names with names from ALIASES - for genre in genres: - if genre in ALIASES: - for alias in ALIASES[genre]: - self.genres[alias] = genres[genre] + for genre_name, genre in genres.items(): + if genre_name in ALIASES: + for alias in ALIASES[genre_name]: + self.genres[alias] = genre else: - self.genres[genre] = genres[genre] + self.genres[genre_name] = genre @group(name="games", aliases=["game"], invoke_without_command=True) async def games(self, ctx: Context, genre: Optional[str] = None, amount: int = 5) -> None: |