This commit is contained in:
@ -173,8 +173,9 @@ async def process_answer(message: Message, state: FSMContext):
|
||||
gift.picture = message.photo[-1].file_id
|
||||
|
||||
|
||||
text = gift_text(gift, message.from_user.id)
|
||||
if gift.picture is None:
|
||||
await message.answer(f"{gift.name}\n{gift.description}\n{gift.link}")
|
||||
await message.answer(text)
|
||||
try:
|
||||
cur.execute(
|
||||
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:
|
||||
print(e)
|
||||
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:
|
||||
cur.execute(
|
||||
f"INSERT OR IGNORE INTO gifts(name, description, link, picture) VALUES(?, ?, ?, ?)",
|
||||
|
||||
Reference in New Issue
Block a user