aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/fun/space.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/fun/space.py')
-rw-r--r--bot/exts/fun/space.py8
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))