diff --git a/Cogs/Events/modmail.py b/Cogs/Events/modmail.py index 503ca39c..30e8ba32 100644 --- a/Cogs/Events/modmail.py +++ b/Cogs/Events/modmail.py @@ -83,7 +83,6 @@ async def Close(interaction: discord.Interaction, reason=None): Modmail = await modmail.find_one({"user_id": interaction.user.id}) else: Modmail = await modmail.find_one({"channel_id": interaction.channel.id}) - TranscriptID = random.randint(100, 50000) if not Modmail: return await interaction.followup.send( content=f"{no} **{interaction.user.display_name},** you have no active modmail." @@ -104,6 +103,11 @@ async def Close(interaction: discord.Interaction, reason=None): ) ModmailType = Config.get("Module Options", {}).get("ModmailType", "channel") channel = interaction.client.get_channel(int(Modmail.get("channel_id"))) + + channelcreated = f"{channel.created_at.strftime('%d/%m/%Y')}" + TranscriptID = random.randint(100, 50000) + + # // Commit Modmail Extermination await modmail.delete_one({"user_id": interaction.user.id}) if channel and ModmailType == "channel": @@ -112,7 +116,7 @@ async def Close(interaction: discord.Interaction, reason=None): io.BytesIO(transcript.encode()), filename=f"transcript-{channel.name}.html", ) - channelcreated = f"{channel.created_at.strftime('%d/%m/%Y')}" + Text = "" async for message in channel.history(limit=None, oldest_first=True):