aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar D0rs4n <[email protected]>2021-06-25 18:25:12 +0200
committerGravatar D0rs4n <[email protected]>2021-06-25 18:25:12 +0200
commita654a782ff5b45d88a0decf155e7fc27d45011bf (patch)
tree9fd64add5569a4c8d4e0fc3c419c4a4eacd9e6fd
parentUpdate bot/exts/halloween/scarymovie.py (diff)
Modify scarymovie to use the constants module everywhere in the code
-rw-r--r--bot/exts/halloween/scarymovie.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bot/exts/halloween/scarymovie.py b/bot/exts/halloween/scarymovie.py
index 99c4758a..33659fd8 100644
--- a/bot/exts/halloween/scarymovie.py
+++ b/bot/exts/halloween/scarymovie.py
@@ -9,8 +9,6 @@ from bot.constants import Tokens
log = logging.getLogger(__name__)
-
-
class ScaryMovie(commands.Cog):
"""Selects a random scary movie and embeds info into Discord chat."""
@@ -30,7 +28,7 @@ class ScaryMovie(commands.Cog):
"""Selects a random movie and returns a JSON of movie details from TMDb."""
url = "https://api.themoviedb.org/3/discover/movie"
params = {
- "api_key": Tokens.tmbd,
+ "api_key": Tokens.tmdb,
"with_genres": "27",
"vote_count.gte": "5",
"include_adult": "false"
@@ -53,7 +51,7 @@ class ScaryMovie(commands.Cog):
# Get full details and credits
async with self.bot.http_session.get(
url=f"https://api.themoviedb.org/3/movie/{selection_id}",
- params={"api_key": TMDB_API_KEY, "append_to_response": "credits"}
+ params={"api_key": Tokens.tmdb, "append_to_response": "credits"}
) as selection:
return await selection.json()