示例#1
0
async def len_5(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=60)
    if len(e) < len(Lininsky_photo5):
        await call.message.answer_photo(photo=open(photo_db.get_one_file_name(name=Lininsky_photo5[len(e)]), 'rb'))
        await call.message.answer(text=Leninsky_text5[len(e)])
    else:
        await call.message.answer("больше нет😔")
示例#2
0
async def oct_4(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=60)
    if len(d) < len(Kirovsky_photo4):
        await call.message.answer_photo(photo=open(photo_db.get_one_file_name(name=Kirovsky_photo4[len(d)]), 'rb'))
        await call.message.answer(text=Kirovsky_text4[len(d)])
    else:
        await call.message.answer("больше нет😔")
示例#3
0
async def enter_hard_test(message: types.Message):
    # присылаем фотку и клаву
    await message.answer_photo(
        photo=open(photo_db.get_one_file_name(name='hard_question_1'), 'rb'))
    await message.answer("Вопрос 1:\n" + Hard_Array_Questions[0] +
                         "\nЧтобы зкончить викторину нажмите /finish_hard")
    await QuizHard.Q1.set()
示例#4
0
async def oct_5(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=60)
    if len(c) < len(Proletarian_photo5):
        await call.message.answer_photo(photo=open(photo_db.get_one_file_name(name=Proletarian_photo5[len(c)]), 'rb'))
        await call.message.answer(text=Proletarian_text5[len(c)])
    else:
        await call.message.answer("больше нет😔")
示例#5
0
async def show_current_page(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=2)
    current_page=int(callback_data.get("page"))
    photo = get_page(array=Leninsky_photo,page=current_page)
    media=InputMediaPhoto(media=open(photo_db.get_one_file_name(name=photo),'rb'))
    markup=get_page_keyboard(k="len",max=max_len,page=current_page)
    await call.message.edit_media(media= media, reply_markup=markup)
示例#6
0
async def sov_5(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=60)
    if len(a) < len(Sovet_photo5):
        await call.message.answer_photo(photo=open(photo_db.get_one_file_name(name=Sovet_photo5[len(a)]), 'rb'))
        await call.message.answer(text=Sovet_text_5[len(a)])
    else:
        await call.message.answer("больше нет😔")
示例#7
0
async def vor_5(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=60)
    if len(g) < len(Voroshil_photo5):
        await call.message.answer_photo(photo=open(
            photo_db.get_one_file_name(name=Voroshil_photo5[len(g)]), 'rb'))
        await call.message.answer(text=Voroshil_text5[len(g)])
    else:
        await call.message.answer("больше нет😔")
示例#8
0
async def enter_easy_test(message: types.Message):
    # присылаем фотку и клаву
    await message.answer_photo(photo=open(
        photo_db.get_one_file_name(name=photo_quiz[0]), 'rb'),
                               reply_markup=quiz_photo1)
    await message.answer(text="<b>Вопрос 1:</b>\n" + Easy_Array_Questions[0],
                         reply_markup=quiz_keyboard1)
    await QuizEasy.Q1.set()
示例#9
0
async def oct_3(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=60)
    if len(b) < len(October_photo3):
        await call.message.answer_photo(
            photo=open(photo_db.get_one_file_name(
                name=October_photo3[len(b)]), 'rb'))
        await call.message.answer(text=October_text3[len(b)])
    else:
        await call.message.answer("больше нет😔")
示例#10
0
async def perv_region_pag(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=2)
    text = get_page(MayDay_text)
    photo = get_page(MayDay_photo)
    await call.message.answer_photo(
        photo=open(photo_db.get_one_file_name(name=photo), 'rb'),
        reply_markup=get_page_keyboard(k="perv", max=max_perv))
    await call.message.answer(text=text,
                              reply_markup=get_text(max=max_perv, k="perv_t"))
示例#11
0
async def vor_region_pag(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=2)
    text = get_page(Voroshil_text)
    photo = get_page(Voroshil_photo)
    await call.message.answer_photo(
        photo=open(photo_db.get_one_file_name(name=photo), 'rb'),
        reply_markup=get_page_keyboard(k="vor", max=max_vor))
    await call.message.answer(text=text,
                              reply_markup=get_text(max=max_vor, k="vor_t"))
示例#12
0
async def perv_3(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=60)
    if len(h) < len(MayDay_photo3):
        await call.message.answer_photo(
            photo=open(photo_db.get_one_file_name(
                name=MayDay_photo3[len(h)]), 'rb'))
        await call.message.answer(text=MayDay_text3[len(h)])
    else:
        await call.message.answer("больше нет😔")
示例#13
0
async def rai_5(call: CallbackQuery, callback_data: dict):
    await call.answer(cache_time=60)
    if len(f) < len(Railway_photo5):
        await call.message.answer_photo(
            photo=open(photo_db.get_one_file_name(
                name=Railway_photo5[len(f)]), 'rb'))
        await call.message.answer(text=Railway_text5[len(f)])
    else:
        await call.message.answer("больше нет😔")
示例#14
0
async def answer_test_1(message: types.Message, state: FSMContext):
    # сохраняем и пишем данные
    answer_6th_medium = message.text
    await state.update_data(answer6=answer_6th_medium)

    # отправляем новую фотку + вопрос
    await message.answer_photo(
        photo=open(photo_db.get_one_file_name(name='medium_question_7'), 'rb'))
    await message.answer("Вопрос 7:\n" + Medium_Array_Questions[6])

    await QuizMedium.Q7.set()
示例#15
0
async def answer_test_5(message: types.Message, state: FSMContext):
    # сохраняем и пишем данные
    answer_5th_easy = message.text
    await state.update_data(answer5=answer_5th_easy)

    await message.answer(text="Вопрос 6:\n", reply_markup=ReplyKeyboardRemove())

    # отправляем новую фотку + вопрос + новую клаву
    await message.answer_photo(photo=open(photo_db.get_one_file_name(name='easy_question_6'), 'rb'))
    await message.answer(Easy_Array_Questions[5], reply_markup=menu_for_easy_quizing.menu_5)
    await QuizEasy.Q6.set()
示例#16
0
async def answer_test_1(message: types.Message, state: FSMContext):
    # сохраняем и пишем данные
    answer_11th_hard = message.text
    await state.update_data(answer14=answer_11th_hard)

    # отправляем новую фотку + вопрос
    await message.answer_photo(
        photo=open(photo_db.get_one_file_name(name='hard_question_15'), 'rb'))
    await message.answer("Вопрос 15:\n" + Hard_Array_Questions[14] +
                         "\nЧтобы зкончить викторину нажмите /finish_hard")
    await QuizHard.Q15.set()
示例#17
0
async def answer_test_6(message: types.Message, state: FSMContext):
    # сохраняем и пишем данные
    answer_9th = message.text
    await state.update_data(answer9=answer_9th)

    # Закрываем и отправляем клаву

    await message.answer(text="Вопрос 10:\n", reply_markup=ReplyKeyboardRemove())

    # отправляем новую фотку + вопрос + новую клаву
    await message.answer_photo(photo=open(photo_db.get_one_file_name(name='easy_question_10'), 'rb'))
    await message.answer(Easy_Array_Questions[9], reply_markup=menu_for_easy_quizing.menu_9)

    await QuizEasy.Q10.set()
示例#18
0
async def enter_easy_test(message: types.Message):
    # присылаем фотку и клаву
    await message.answer_photo(
        photo=open(photo_db.get_one_file_name(name='medium_question_1'), 'rb'))
    await message.answer("Вопрос 1:\n" + Medium_Array_Questions[0])
    await QuizMedium.Q1.set()
示例#19
0
async def enter_easy_test(message: types.Message):
    # присылаем фотку и клаву
    await message.answer(text="Вопрос 1:\n")
    await message.answer_photo(photo=open(photo_db.get_one_file_name(name='easy_question_1'), 'rb'))
    await message.answer(Easy_Array_Questions[0], reply_markup=menu_for_easy_quizing.menu_0)
    await QuizEasy.Q1.set()
示例#20
0
async def question_1(call: CallbackQuery):
    await call.answer(cache_time=60)
    await call.message.edit_media(media=InputMediaPhoto(media=open(photo_db.get_one_file_name(name=photo_quiz[7]), 'rb')),reply_markup=quiz_photo8)