diff options
| author | 2020-05-22 08:12:08 +0300 | |
|---|---|---|
| committer | 2020-05-22 08:12:08 +0300 | |
| commit | a46eff8d976cf65155f27ed75f49bd3e58155c84 (patch) | |
| tree | 00c687e58bd7d46962a52da16776bb19922fd6cd | |
| parent | Help: Implemented faster close when claimant delete msg no more messages (diff) | |
Help: Fix docstrings of `is_empty` and `on_message_delete`
Co-authored-by: Mark <[email protected]>
| -rw-r--r-- | bot/cogs/help_channels.py | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 4415ce550..ed1f7c55e 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -719,7 +719,11 @@ class HelpChannels(Scheduler, commands.Cog):      @commands.Cog.listener()      async def on_message_delete(self, msg: discord.Message) -> None: -        """Reschedule dormant when help channel is empty.""" +        """ +        Reschedule an in-use channel to become dormant sooner if the channel is empty. + +        The new time for the dormant task is configured with `HelpChannels.deleted_idle_minutes`.  +        """          if not self.is_in_category(msg.channel, constants.Categories.help_in_use) or not self.is_empty(msg.channel):              return @@ -732,7 +736,7 @@ class HelpChannels(Scheduler, commands.Cog):          self.schedule_task(msg.channel.id, task)      async def is_empty(self, channel: discord.TextChannel) -> bool: -        """Check is last message bot sent available message.""" +        """Return True if the most recent message in `channel` is the bot's `AVAILABLE_MSG`."""          msg = await self.get_last_message(channel)          if not msg or not msg.author.bot or not msg.embeds:              return False | 
