From 3b7248cb007fd9620e62ab70893bf5aa1d4ac903 Mon Sep 17 00:00:00 2001 From: Michal Tuszowski Date: Tue, 21 Jan 2025 21:47:13 +0100 Subject: [PATCH] Fixit --- ai_commands.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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