diff options
-rw-r--r-- | bot/exts/help_channels/_message.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/bot/exts/help_channels/_message.py b/bot/exts/help_channels/_message.py index e21e9a450..b6b172e77 100644 --- a/bot/exts/help_channels/_message.py +++ b/bot/exts/help_channels/_message.py @@ -133,7 +133,7 @@ async def notify_none_remaining(channel: discord.TextChannel, last_notification: Configuration: * `HelpChannels.notify_minutes` - minimum interval between notifications - * `HelpChannels.notify_none_remaining` - toggle notifications + * `HelpChannels.notify_none_remaining` - toggle none_remaining notifications * `HelpChannels.notify_none_remaining_roles` - roles mentioned in notifications """ if not constants.HelpChannels.notify_none_remaining: @@ -171,6 +171,21 @@ async def notify_none_remaining(channel: discord.TextChannel, last_notification: log.exception("Failed to send notification about lack of dormant channels!") +async def notify_running_low(): + """ + Send a non-pinging message in `channel` notifying about there being a low amount of dormant channels. + + If a notification was sent, return the time at which the message was sent. + Otherwise, return None. + + Configuration: + * `HelpChannels.notify_minutes` - minimum interval between notifications + * `HelpChannels.notify_running_low` - toggle running_low notifications + * `HelpChannels.notify_running_low_threshold` - minimum amount of channels to trigger running_low notifications + """ + ... + + async def pin(message: discord.Message) -> None: """Pin an initial question `message` and store it in a cache.""" if await pin_wrapper(message.id, message.channel, pin=True): |