diff --git a/ai_commands.py b/ai_commands.py index 240d968..623abab 100644 --- a/ai_commands.py +++ b/ai_commands.py @@ -369,8 +369,6 @@ class Events(commands.Cog): image_desc = response.data[0].revised_prompt self.logger.debug("Wynikowy obrazek pod url: %s", image_url) response = requests.get(image_url, timeout=360) - - temp_file_name = message.content + ".png" temp_file_name = GRAPHICS_PATH + message.content + ".png" num = 0 @@ -381,16 +379,16 @@ class Events(commands.Cog): with open(temp_file_name, "wb") as dalle_file: dalle_file.write(response.content) except OSError: - temp_file_name = "oserror.png" + temp_file_name = "/home/pi/oserror.png" with open(temp_file_name, "wb") as dalle_file: dalle_file.write(response.content) except FileNotFoundError: - temp_file_name = "fnferror.png" + temp_file_name = "/home/pi/fnferror.png" with open(temp_file_name, "wb") as dalle_file: dalle_file.write(response.content) except Exception as e: self.logger.error("Nieznany błąd: %s", e) - temp_file_name = "error.png" + temp_file_name = "/home/pi/error.png" with open(temp_file_name, "wb") as dalle_file: dalle_file.write(response.content)