diff options
Diffstat (limited to 'bot/exts/fun/movie.py')
| -rw-r--r-- | bot/exts/fun/movie.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/fun/movie.py b/bot/exts/fun/movie.py index a04eeb41..b6289887 100644 --- a/bot/exts/fun/movie.py +++ b/bot/exts/fun/movie.py @@ -9,7 +9,6 @@ from discord.ext.commands import Cog, Context, group from bot.bot import Bot from bot.constants import Tokens -from bot.utils.extensions import invoke_help_command from bot.utils.pagination import ImagePaginator # Define base URL of TMDB @@ -50,6 +49,7 @@ class Movie(Cog): """Movie Cog contains movies command that grab random movies from TMDB.""" def __init__(self, bot: Bot): + self.bot = bot self.http_session: ClientSession = bot.http_session @group(name="movies", aliases=("movie",), invoke_without_command=True) @@ -73,7 +73,7 @@ class Movie(Cog): try: result = await self.get_movies_data(self.http_session, MovieGenres[genre].value, 1) except KeyError: - await invoke_help_command(ctx) + await self.bot.invoke_help_command(ctx) return # Check if "results" is in result. If not, throw error. @@ -200,6 +200,6 @@ class Movie(Cog): return embed -def setup(bot: Bot) -> None: +async def setup(bot: Bot) -> None: """Load the Movie Cog.""" - bot.add_cog(Movie(bot)) + await bot.add_cog(Movie(bot)) |