aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/bot.py13
-rw-r--r--bot/constants.py1
-rw-r--r--config-default.yml1
3 files changed, 12 insertions, 3 deletions
diff --git a/bot/bot.py b/bot/bot.py
index e5b9717db..c818e79fb 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -68,9 +68,16 @@ class Bot(commands.Bot):
return
if not guild.roles or not guild.members or not guild.channels:
- log.warning(
- "Guild available event was dispatched but the cache appears to still be empty!"
- )
+ msg = "Guild available event was dispatched but the cache appears to still be empty!"
+ log.warning(msg)
+
+ try:
+ webhook = await self.fetch_webhook(constants.Webhooks.dev_log)
+ except discord.HTTPException as e:
+ log.error(f"Failed to fetch webhook to send empty cache warning: status {e.status}")
+ else:
+ await webhook.send(f"<@&{constants.Roles.admin}> {msg}")
+
return
self._guild_available.set()
diff --git a/bot/constants.py b/bot/constants.py
index 81ce3e903..9856854d7 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -406,6 +406,7 @@ class Webhooks(metaclass=YAMLGetter):
big_brother: int
reddit: int
duck_pond: int
+ dev_log: int
class Roles(metaclass=YAMLGetter):
diff --git a/config-default.yml b/config-default.yml
index 0ebdc4080..6808925c2 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -179,6 +179,7 @@ guild:
big_brother: 569133704568373283
reddit: 635408384794951680
duck_pond: 637821475327311927
+ dev_log: 680501655111729222
filter: