Skip to content

Commit 6ee0b8a

Browse files
committed
Add closing reason for when OP closes uses native Discord close option
1 parent 9ae4922 commit 6ee0b8a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

bot/exts/help_channels/_channel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ async def _close_help_post(closed_post: discord.Thread, closing_reason: _stats.C
5353
close_title = f"Python help channel closed by OP with {constants.Bot.prefix}close"
5454
elif closing_reason == _stats.ClosingReason.INACTIVE:
5555
close_title = "Python help channel closed for inactivity"
56+
elif closing_reason == _stats.ClosingReason.NATIVE:
57+
close_title = "Python help channel closed by OP"
5658
else:
5759
close_title = "Python help channel closed"
5860

@@ -138,7 +140,7 @@ async def help_post_archived(archived_post: discord.Thread) -> None:
138140
if thread_update.user.id == bot.instance.user.id:
139141
return
140142

141-
await _close_help_post(archived_post, _stats.ClosingReason.INACTIVE)
143+
await _close_help_post(archived_post, _stats.ClosingReason.NATIVE)
142144

143145

144146
async def help_post_deleted(deleted_post_event: discord.RawThreadDeleteEvent) -> None:

bot/exts/help_channels/_stats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class ClosingReason(Enum):
1616

1717
COMMAND = "command"
1818
INACTIVE = "auto.inactive"
19+
NATIVE = "auto.native"
1920
DELETED = "auto.deleted"
2021
CLEANUP = "auto.cleanup"
2122

0 commit comments

Comments
 (0)