diff options
| author | 2020-02-29 10:20:57 -0800 | |
|---|---|---|
| committer | 2020-03-22 15:54:43 -0700 | |
| commit | 825da2a9d24b04ea8e319e0bd7972465934ba6b5 (patch) | |
| tree | c688e4b3d6edc763d22c29586c0160920280364a | |
| parent | HelpChannels: fix task cancelling itself (diff) | |
HelpChannels: fix last notification time not being set
| -rw-r--r-- | bot/cogs/help_channels.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 0e3b1e893..b215ed3d7 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -485,11 +485,13 @@ class HelpChannels(Scheduler, commands.Cog): channel = self.bot.get_channel(constants.HelpChannels.notify_channel) mentions = " ".join(f"<@&{role}>" for role in constants.HelpChannels.notify_roles) - await channel.send( + message = await channel.send( f"{mentions} A new available help channel is needed but there " f"are no more dormant ones. Consider freeing up some in-use channels manually by " f"using the `!dormant` command within the channels." ) + + self.last_notification = message.created_at except Exception: # Handle it here cause this feature isn't critical for the functionality of the system. log.exception("Failed to send notification about lack of dormant channels!") |