aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks123 <[email protected]>2020-03-31 09:00:16 +0300
committerGravatar ks123 <[email protected]>2020-03-31 09:00:16 +0300
commit4ba21db3dc38630859bd42eea3f5289f4606717b (patch)
tree53cebc3ab8759d8ecee30f98c6f2fb8b7209ddc4
parent(Games Cog): Fixed matching not found message (diff)
(Games Cog): Added check is there more than 1 possibility of genre matching that have higher than 0.60 ratio.
-rw-r--r--bot/seasons/evergreen/game.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/seasons/evergreen/game.py b/bot/seasons/evergreen/game.py
index cc798da5..68fc7422 100644
--- a/bot/seasons/evergreen/game.py
+++ b/bot/seasons/evergreen/game.py
@@ -201,6 +201,9 @@ class Games(Cog):
possibility = None
# Check is there any possibility that ratio is higher than 0.60
for p in possibilities:
+ # If there is more than 1 genre that have higher than 0.60 ratio, then show list of possibilities
+ if sum(1 for po in possibilities if po[0] >= 0.60) > 1:
+ break
if p[0] >= 0.60:
possibility = await self.get_games_list(amount, self.genres[p[1]], offset=random.randint(0, 150))
genre = p[1]