diff options
| author | 2023-03-30 09:52:27 +0100 | |
|---|---|---|
| committer | 2023-03-30 09:52:27 +0100 | |
| commit | 7ce078a12d96cfce3bdd293fffcc82642e95dd82 (patch) | |
| tree | 458689a47343aecded601ef12dccdc58b886235e | |
| parent | max -> min (diff) | |
Ensure page is always random
| -rw-r--r-- | bot/exts/holidays/halloween/scarymovie.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/holidays/halloween/scarymovie.py b/bot/exts/holidays/halloween/scarymovie.py index 94d4d4d7..9f1a95fd 100644 --- a/bot/exts/holidays/halloween/scarymovie.py +++ b/bot/exts/holidays/halloween/scarymovie.py @@ -51,7 +51,7 @@ class ScaryMovie(commands.Cog): total_pages = data.get("total_pages") # Get movie details from one random result on a random page - params["page"] = min(random.randint(1, total_pages), 500) + params["page"] = random.randint(1, min(total_pages, 500)) async with self.bot.http_session.get(url=url, params=params, headers=headers) as response: data = await response.json() if (results := data.get("results")) is None: |