From bc1cf95ca6eca572bcae43df6776922df88ad69a Mon Sep 17 00:00:00 2001 From: Paillat Date: Tue, 6 Dec 2022 21:51:40 +0100 Subject: [PATCH] Update code.py --- code/code.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/code.py b/code/code.py index 50bf1d0..6a1605c 100644 --- a/code/code.py +++ b/code/code.py @@ -435,6 +435,7 @@ async def transcript(ctx, channel: discord.TextChannel = None): messages.reverse() transcript = "" #defer the response + await ctx.defer() #defer the response so that the bot doesn't say that it's thinking for msg in messages: if msg.author.bot: transcript += f"Botator: {msg.content}\n" @@ -464,6 +465,7 @@ async def transcript(ctx, channel: discord.TextChannel = None): await ctx.author.send(file=discord.File("transcript.txt")) #delete the file os.remove("transcript.txt") + return await ctx.channel.purge() #these are debug commands and should not be used in production @bot.command(name="say", description="Say a message") async def say(ctx, message: str):