diff options
author | 2021-05-10 10:07:48 +0530 | |
---|---|---|
committer | 2021-10-11 12:05:41 +0530 | |
commit | fc9a9d2cd01530444804b271ed00432cacf85353 (patch) | |
tree | af72a30772a0b96bb9b8b758f53bcb8aba22a163 | |
parent | (incidents): Use subtests for test_shorten_text (diff) |
(incidents):Log with error if webhook not found
-rw-r--r-- | bot/exts/moderation/incidents.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/exts/moderation/incidents.py b/bot/exts/moderation/incidents.py index 22b50625a..7d0984bd1 100644 --- a/bot/exts/moderation/incidents.py +++ b/bot/exts/moderation/incidents.py @@ -297,6 +297,9 @@ class Incidents(Cog): await self.bot.wait_until_guild_available() self.incidents_webhook = await self.bot.fetch_webhook(Webhooks.incidents) + if not self.incidents_webhook: + log.error(f"Failed to fetch incidents webhook with id `{Webhooks.incidents}`.") + async def crawl_incidents(self) -> None: """ Crawl #incidents and add missing emoji where necessary. |