aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/fun/movie.py
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2022-09-23 22:58:49 +0100
committerGravatar GitHub <[email protected]>2022-09-23 22:58:49 +0100
commitf9cc77f55a7bac9cff1f5674b36b3f17560f6bfe (patch)
tree4d9a9684d6c0d8f1f749355353fbadb7fd89960b /bot/exts/fun/movie.py
parentFix issue #1050 (#1097) (diff)
parentRemove all wait_until_guil_available as this is now done in bot-core (diff)
Merge pull request #1092 from python-discord/bot-core-migration
Diffstat (limited to 'bot/exts/fun/movie.py')
-rw-r--r--bot/exts/fun/movie.py8
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))