aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/evergreen')
-rw-r--r--bot/exts/evergreen/movie.py2
-rw-r--r--bot/exts/evergreen/wikipedia.py2
2 files changed, 3 insertions, 1 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:
diff --git a/bot/exts/evergreen/wikipedia.py b/bot/exts/evergreen/wikipedia.py
index 28bbf0de..7b96cb7b 100644
--- a/bot/exts/evergreen/wikipedia.py
+++ b/bot/exts/evergreen/wikipedia.py
@@ -44,7 +44,7 @@ class WikipediaSearch(commands.Cog):
async def wiki_request(self, channel: TextChannel, search: str) -> Optional[List[str]]:
"""Search wikipedia search string and return formatted first 10 pages found."""
- params = dict(WIKI_PARAMS, srlimit=10, srsearch=search)
+ params = WIKI_PARAMS | {"srlimit": 10, "srsearch": search}
async with self.bot.http_session.get(url=SEARCH_API, params=params) as resp:
if resp.status == 200:
raw_data = await resp.json()