diff --git a/ai_commands.py b/ai_commands.py index 623abab..a627621 100644 --- a/ai_commands.py +++ b/ai_commands.py @@ -391,11 +391,12 @@ class Events(commands.Cog): temp_file_name = "/home/pi/error.png" with open(temp_file_name, "wb") as dalle_file: dalle_file.write(response.content) + finally: + self.logger.info("Koniec procedury obrazkowej.") + fnord = discord.File( + temp_file_name, spoiler=False, description=message.content + ) - self.logger.info("Koniec procedury obrazkowej.") - fnord = discord.File( - temp_file_name, spoiler=False, description=message.content - ) #await message.reply(f"{image_desc}", file=fnord) await discord_friendly_reply(message,f"{image_desc}", file = fnord) # *=========================================== Define Functions