aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/holidays
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2023-05-06 17:19:28 +0100
committerGravatar GitHub <[email protected]>2023-05-06 17:19:28 +0100
commit56cefe8f3e1ec4ca6c0cb26a64c2a13d146d6448 (patch)
treeb6a35a1504df0f0a9bd9f5bfc2edfde0d8948f05 /bot/exts/holidays
parentuse the new code jam variable (#1267) (diff)
parentUpdate bot/exts/holidays/halloween/spookygif.py (diff)
Merge pull request #1269 from shtlrs/load-cogs-when-config-is-setup
Run null check on needed API keys before loading cogs.
Diffstat (limited to 'bot/exts/holidays')
-rw-r--r--bot/exts/holidays/halloween/scarymovie.py3
-rw-r--r--bot/exts/holidays/halloween/spookygif.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/bot/exts/holidays/halloween/scarymovie.py b/bot/exts/holidays/halloween/scarymovie.py
index 00c96153..fbab3dd2 100644
--- a/bot/exts/holidays/halloween/scarymovie.py
+++ b/bot/exts/holidays/halloween/scarymovie.py
@@ -135,4 +135,7 @@ class ScaryMovie(commands.Cog):
async def setup(bot: Bot) -> None:
"""Load the Scary Movie Cog."""
+ if not Tokens.tmdb:
+ log.warning("No TMDB Token. Not loading ScaryMovie Cog.")
+ return
await bot.add_cog(ScaryMovie(bot))
diff --git a/bot/exts/holidays/halloween/spookygif.py b/bot/exts/holidays/halloween/spookygif.py
index 7a90a8a9..b3f9d703 100644
--- a/bot/exts/holidays/halloween/spookygif.py
+++ b/bot/exts/holidays/halloween/spookygif.py
@@ -35,4 +35,7 @@ class SpookyGif(commands.Cog):
async def setup(bot: Bot) -> None:
"""Spooky GIF Cog load."""
+ if not Tokens.giphy:
+ log.warning("No Giphy token. Not loading SpookyGif cog.")
+ return
await bot.add_cog(SpookyGif(bot))