Exemple #1
0
async def process_for_button2(callback_query: types.CallbackQuery):
    await bot.answer_callback_query(callback_query.id)
    await bot.send_message(callback_query.from_user.id,
                           'Вы выбрали вариант в течение 7 дней :')
    await bot.send_message(callback_query.from_user.id,
                           'Введите ожижаемую стоимость 💵: ',
                           reply_markup=customer_keyboard3())
    global data
    data = datetime.datetime.now() + datetime.timedelta(days=7)
Exemple #2
0
async def send_text(message: types.message, state: FSMContext):
    answer = message.text
    global data
    if str(message.text).isdigit():
        data = datetime.datetime.now() + datetime.timedelta(days=int(answer))
    else:
        data = answer
    await state.update_data(answer1=answer)
    sleep(1)
    await message.answer('Выберите желаемую стоимость: ',
                         reply_markup=customer_keyboard3())
    global price
    price = answer
    await state.reset_state()