コード例 #1
0
async def how_many_middle(m: types.Message):
    try:
        database.update_test(m.from_user.id, "how_many", 3)
        await bot.send_message(m.from_user.id,
                               HOW_MANY_QUESTIONS[database.get_test_state(
                                   m.from_user.id, "how_many")],
                               reply_markup=tests_buttons("how_many"))
    except Exception as e:
        print(e)
        await finnaly(m)
コード例 #2
0
async def how_many_me(m: types.Message):
    try:
        database.update_test(m.from_user.id, "uncertainty", 5)
        await bot.send_message(m.from_user.id,
                               UNCERTAINTY_QUESTIONS[database.get_test_state(
                                   m.from_user.id, "uncertainty")],
                               reply_markup=tests_buttons("uncertainty"))
    except Exception as e:
        print(e)
        await finnaly(m)