diff options
author | 2021-06-24 17:47:53 +0200 | |
---|---|---|
committer | 2021-06-24 17:47:53 +0200 | |
commit | 1756871fedbd3053283cb136521c248a5ec9bd73 (patch) | |
tree | d801b273753e8bbb159cd82cff86b9a769c62702 /bot/exts | |
parent | Merge pull request #774 from python-discord/new-github-emoji (diff) |
Fix .scarymovie command(halloween)
Modify the incorrect API endpoint and set HTTP parameters accordingly.
Diffstat (limited to 'bot/exts')
-rw-r--r-- | bot/exts/halloween/scarymovie.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/exts/halloween/scarymovie.py b/bot/exts/halloween/scarymovie.py index f4cf41db..8be2cbaa 100644 --- a/bot/exts/halloween/scarymovie.py +++ b/bot/exts/halloween/scarymovie.py @@ -31,13 +31,14 @@ class ScaryMovie(commands.Cog): async def select_movie(self) -> dict: """Selects a random movie and returns a JSON of movie details from TMDb.""" - url = "https://api.themoviedb.org/4/discover/movie" + url = "https://api.themoviedb.org/3/discover/movie" params = { + "api_key": TMDB_API_KEY, "with_genres": "27", - "vote_count.gte": "5" + "vote_count.gte": "5", + "include_adult": "false" } headers = { - "Authorization": "Bearer " + TMDB_TOKEN, "Content-Type": "application/json;charset=utf-8" } |