From c6b93cf931488844eea8e14255e27a2a2b5b1cda Mon Sep 17 00:00:00 2001 From: sgoudham Date: Sat, 8 Aug 2020 22:55:22 +0100 Subject: [PATCH] Made sure that all messages within the channel are stored in the file before getting deleted --- cogs/guild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/guild.py b/cogs/guild.py index b6180749..de176a26 100644 --- a/cogs/guild.py +++ b/cogs/guild.py @@ -654,7 +654,7 @@ class Guild(Cog): # Store all text in the channel in a bytesio object text = "" async for message in user_channel.history(limit=300): - text = "".join(f"{message.created_at} : {message.content}\n") + text += "".join(f"{message.created_at} : {message.content}\n") text_bytes = str.encode(text) file = io.BytesIO(text_bytes)