ya pidoras
Some checks failed
docker / docker-push (push) Has been cancelled

This commit is contained in:
2026-03-12 19:20:01 +03:00
parent 231198e8a7
commit 3db1cdeffe

View File

@ -173,8 +173,9 @@ async def process_answer(message: Message, state: FSMContext):
gift.picture = message.photo[-1].file_id gift.picture = message.photo[-1].file_id
text = gift_text(gift, message.from_user.id)
if gift.picture is None: if gift.picture is None:
await message.answer(f"{gift.name}\n{gift.description}\n{gift.link}") await message.answer(text)
try: try:
cur.execute( cur.execute(
f"INSERT OR IGNORE INTO gifts(name, description, link) VALUES(?, ?, ?)", f"INSERT OR IGNORE INTO gifts(name, description, link) VALUES(?, ?, ?)",
@ -184,7 +185,7 @@ async def process_answer(message: Message, state: FSMContext):
except Exception as e: except Exception as e:
print(e) print(e)
else: else:
await message.answer_photo(photo = gift.picture, caption=f"{gift.name}\n{gift.description}\n{gift.link}") await message.answer_photo(photo = gift.picture, caption=text)
try: try:
cur.execute( cur.execute(
f"INSERT OR IGNORE INTO gifts(name, description, link, picture) VALUES(?, ?, ?, ?)", f"INSERT OR IGNORE INTO gifts(name, description, link, picture) VALUES(?, ?, ?, ?)",