diff options
| author | 2021-03-30 22:26:37 +0100 | |
|---|---|---|
| committer | 2021-03-30 22:26:37 +0100 | |
| commit | 74eed3e9d39a203b6abfa2ea45ef00286f3639b1 (patch) | |
| tree | 24c337e5573213252a7fcec91f3efd8ff4b20750 | |
| parent | Merge pull request #1491 from python-discord/fix/dmrelay (diff) | |
Use deleted reason if help channel is closed due to being empty
| -rw-r--r-- | bot/exts/help_channels/_channel.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/exts/help_channels/_channel.py b/bot/exts/help_channels/_channel.py index 2837bc7c5..0846b28c8 100644 --- a/bot/exts/help_channels/_channel.py +++ b/bot/exts/help_channels/_channel.py @@ -75,7 +75,8 @@ async def get_closing_time(channel: discord.TextChannel, init_done: bool) -> t.T # Use the greatest offset to avoid the possibility of prematurely closing the channel. time = Arrow.fromdatetime(msg.created_at) + timedelta(minutes=idle_minutes_claimant) - return time, ClosingReason.LATEST_MESSSAGE + reason = ClosingReason.DELETED if is_empty else ClosingReason.LATEST_MESSSAGE + return time, reason claimant_time = Arrow.utcfromtimestamp(claimant_time) others_time = await _caches.non_claimant_last_message_times.get(channel.id) |