diff options
| author | 2022-01-31 23:25:36 +0000 | |
|---|---|---|
| committer | 2022-01-31 23:25:36 +0000 | |
| commit | 9361f32aa8c3b201dc62edf0153b71c053411712 (patch) | |
| tree | 3f05ad71cee1ffe8c168aa1cf243a95fd9bde642 | |
| parent | 📝 Update `notify_none_remaining` docstring (diff) | |
💡 Update docstrings
| -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): | 
