К
Size: a a a
К
F
ф[
ЕП
A
Ƀ
TA
Ƀ
И
F
Б
😎
@dp.message_handler(content_types=['photo'], state=Form.photo)
async def process_photo(message: types.Message, state: FSMContext):
async with state.proxy() as data:
data['photo'] = message.photo[-1].file_id
await message.photo[-1].download(message.photo[-1].file_id)
data = await state.get_data()
n = data.get("name")
e = data.get("email")
p = data.get("phone")
text = f'имя:{n},емаил:{e},номер:{p}'
await message.reply(text=text)
sql = "INSERT INTO reg(name,email,phone) \
VALUES (%s, %s, %s)"
val = (n, e, p)
cursor.execute(sql, val)
db.commit()
await state.finish()
TA
@dp.message_handler(content_types=['photo'], state=Form.photo)
async def process_photo(message: types.Message, state: FSMContext):
async with state.proxy() as data:
data['photo'] = message.photo[-1].file_id
await message.photo[-1].download(message.photo[-1].file_id)
data = await state.get_data()
n = data.get("name")
e = data.get("email")
p = data.get("phone")
text = f'имя:{n},емаил:{e},номер:{p}'
await message.reply(text=text)
sql = "INSERT INTO reg(name,email,phone) \
VALUES (%s, %s, %s)"
val = (n, e, p)
cursor.execute(sql, val)
db.commit()
await state.finish()
😎
И
TA
😎
TA
F🍭
TA