aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-02-28 11:29:27 -0800
committerGravatar MarkKoz <[email protected]>2020-03-22 15:54:41 -0700
commite42f4a7d6487fa76cb41abad2dda2f7e2e5b7c4d (patch)
tree3520887f95c38814f7429a34a30c1c98fefff9b9
parentHelpChannels: move newest in-use channel to the top (diff)
HelpChannels: add trace logging for notifications
-rw-r--r--bot/cogs/help_channels.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index ab2f5b8c3..d226b201a 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -454,6 +454,8 @@ class HelpChannels(Scheduler, commands.Cog):
if not constants.HelpChannels.notify:
return
+ log.trace("Notifying about lack of channels.")
+
if self.last_notification:
elapsed = (datetime.utcnow() - self.last_notification).seconds
minimum_interval = constants.HelpChannels.notify_minutes * 60
@@ -462,9 +464,12 @@ class HelpChannels(Scheduler, commands.Cog):
should_send = True
if not should_send:
+ log.trace("Notification not sent because it's too recent since the previous one.")
return
try:
+ log.trace("Sending notification message.")
+
channel = self.bot.get_channel(constants.HelpChannels.notify_channel)
mentions = " ".join(f"<@&{role}>" for role in constants.HelpChannels.notify_roles)