From fc9a9d2cd01530444804b271ed00432cacf85353 Mon Sep 17 00:00:00 2001 From: Shivansh Date: Mon, 10 May 2021 10:07:48 +0530 Subject: (incidents):Log with error if webhook not found --- bot/exts/moderation/incidents.py | 3 +++ 1 file changed, 3 insertions(+) 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. -- cgit v1.2.3