aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/movie.py
diff options
context:
space:
mode:
authorGravatar D0rs4n <[email protected]>2021-08-07 23:02:18 +0200
committerGravatar D0rs4n <[email protected]>2021-08-07 23:02:18 +0200
commit22abc00742a610443b2cffe3ae609056a98da713 (patch)
treecd5be6ae7d30c8c780f5728fc3280ea262b93b8c /bot/exts/evergreen/movie.py
parentUpdate Hacktoberstats' get_october_prs function to use aiohttps get params (diff)
Improve code consistency in Movie, Wikipedia and Hactoberstats Cogs
Diffstat (limited to 'bot/exts/evergreen/movie.py')
-rw-r--r--bot/exts/evergreen/movie.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/exts/evergreen/movie.py b/bot/exts/evergreen/movie.py
index 82fd50bc..c6af4bcd 100644
--- a/bot/exts/evergreen/movie.py
+++ b/bot/exts/evergreen/movie.py
@@ -141,6 +141,8 @@ class Movie(Cog):
async def get_movie(self, client: ClientSession, movie: int) -> Dict:
"""Get Movie by movie ID from TMDB. Return result dictionary."""
+ if not isinstance(movie, int):
+ raise ValueError("Error while fetching movie from TMDB, movie argument must be integer. ")
url = BASE_URL + f"movie/{movie}"
async with client.get(url, params=MOVIE_PARAMS) as resp: