diff options
author | 2022-09-23 22:58:49 +0100 | |
---|---|---|
committer | 2022-09-23 22:58:49 +0100 | |
commit | f9cc77f55a7bac9cff1f5674b36b3f17560f6bfe (patch) | |
tree | 4d9a9684d6c0d8f1f749355353fbadb7fd89960b /bot/exts/fun/space.py | |
parent | Fix issue #1050 (#1097) (diff) | |
parent | Remove 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/space.py')
-rw-r--r-- | bot/exts/fun/space.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/fun/space.py b/bot/exts/fun/space.py index 48ad0f96..22a89050 100644 --- a/bot/exts/fun/space.py +++ b/bot/exts/fun/space.py @@ -11,7 +11,6 @@ from discord.ext.commands import Cog, Context, group from bot.bot import Bot from bot.constants import Tokens from bot.utils.converters import DateConverter -from bot.utils.extensions import invoke_help_command logger = logging.getLogger(__name__) @@ -27,6 +26,7 @@ class Space(Cog): def __init__(self, bot: Bot): self.http_session = bot.http_session + self.bot = bot self.rovers = {} self.get_rovers.start() @@ -50,7 +50,7 @@ class Space(Cog): @group(name="space", invoke_without_command=True) async def space(self, ctx: Context) -> None: """Head command that contains commands about space.""" - await invoke_help_command(ctx) + await self.bot.invoke_help_command(ctx) @space.command(name="apod") async def apod(self, ctx: Context, date: Optional[str]) -> None: @@ -227,10 +227,10 @@ class Space(Cog): ).set_image(url=image).set_footer(text="Powered by NASA API" + footer) -def setup(bot: Bot) -> None: +async def setup(bot: Bot) -> None: """Load the Space cog.""" if not Tokens.nasa: logger.warning("Can't find NASA API key. Not loading Space Cog.") return - bot.add_cog(Space(bot)) + await bot.add_cog(Space(bot)) |