From 2d36b873600e4cf45d5af4f009abda884cf0c489 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Tue, 14 Feb 2023 13:51:06 +0200 Subject: [PATCH] Removed strange file creation --- bot/handlers/txt2img/txt2img.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bot/handlers/txt2img/txt2img.py b/bot/handlers/txt2img/txt2img.py index 5dc26b6..2212684 100644 --- a/bot/handlers/txt2img/txt2img.py +++ b/bot/handlers/txt2img/txt2img.py @@ -1,7 +1,6 @@ from aiogram import types from bot.db import db, DBTables from bot.utils.cooldown import throttle -import os.path from bot.modules.api.txt2img import txt2img @@ -12,14 +11,10 @@ async def txt2img_comand(message: types.Message): await temp_message.edit_text("Specify prompt for this command. Check /help txt2img") return - if not os.path.isfile('adstring'): - with open('adstring', 'w') as f: - f.write('@aiistop_bot') - try: image = await txt2img(message.get_args()) await message.reply_photo(photo=image[0], caption=str( - image[1]["infotexts"][0]) + "\n\n" + open('adstring').read()) + image[1]["infotexts"][0])) except Exception as e: assert e await message.reply("We ran into error while processing your request. StableDiffusion models may not be "