diff options
| author | 2021-08-07 23:02:18 +0200 | |
|---|---|---|
| committer | 2021-08-07 23:02:18 +0200 | |
| commit | 22abc00742a610443b2cffe3ae609056a98da713 (patch) | |
| tree | cd5be6ae7d30c8c780f5728fc3280ea262b93b8c /bot/exts/evergreen/movie.py | |
| parent | Update 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.py | 2 |
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: |