From 467633e71375426ff3020fd593691bb4f6b26025 Mon Sep 17 00:00:00 2001 From: Rstarks07 <107148716+Rstarks07@users.noreply.github.com> Date: Tue, 21 Jul 2026 10:11:15 +0000 Subject: [PATCH] fix: report the actual message count in the transcript header The header was built from the requested limit rather than the number of messages actually exported, so exporting a 47-message channel with limit=9999 rendered "This is the latest 9999 messages of the #general channel." self.messages is already populated by export() before build_transcript() runs, and the same value is used a few lines below for MESSAGE_COUNT, so the header now agrees with the count the transcript already reports. raw_export() is unaffected: it passes limit=None, which still renders "start". --- chat_exporter/construct/transcript.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat_exporter/construct/transcript.py b/chat_exporter/construct/transcript.py index 334c7c9..d624472 100644 --- a/chat_exporter/construct/transcript.py +++ b/chat_exporter/construct/transcript.py @@ -138,7 +138,7 @@ async def export_transcript(self, message_html: str, meta_data: str): limit = "start" if self.limit: - limit = f"latest {self.limit} messages" + limit = f"latest {len(self.messages)} messages" subject = await fill_out( self.channel.guild,