aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar D0rs4n <[email protected]>2021-06-24 17:47:53 +0200
committerGravatar D0rs4n <[email protected]>2021-06-24 17:47:53 +0200
commit1756871fedbd3053283cb136521c248a5ec9bd73 (patch)
treed801b273753e8bbb159cd82cff86b9a769c62702 /bot
parentMerge 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')
-rw-r--r--bot/exts/halloween/scarymovie.py7
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"
}