Главная страница

авыа ыва ыва. Diplomnaya.Rabota._цуеуцеыы1_ — копия. ЫНаучный руководитель ученая степень, должность


Скачать 1.57 Mb.
НазваниеЫНаучный руководитель ученая степень, должность
Анкоравыа ыва ыва
Дата18.05.2022
Размер1.57 Mb.
Формат файлаdocx
Имя файлаDiplomnaya.Rabota._цуеуцеыы1_ — копия.docx
ТипРеферат
#537003
страница6 из 7
1   2   3   4   5   6   7

def onfourth13(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(4, 13, 'question'),

reply_markup=keyboard)

def onfourth14(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(4, 14, 'question'),

reply_markup=keyboard)

def onfourth15(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(4, 15, 'question'),

reply_markup=keyboard)

def onfourth16(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(4, 16, 'question'),

reply_markup=keyboard)

def onfourth17(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(4, 17, 'question'),

reply_markup=keyboard)

def onfourth18(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(4, 18, 'question'),

reply_markup=keyboard)

def onfourth19(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(4, 19, 'question'),

reply_markup=keyboard)

def onfourth20(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(4, 20, 'question'),

reply_markup=keyboard)

def onfourth21(e):

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(4, 3, 'answer'))

if fsm.current in finals:

fsm.go_to_start()

return

def onfourth_4_20_no(e):

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(4, 4, 'answer'))

if fsm.current in finals:

fsm.go_to_start()

return

def onfifth1(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 1, 'question'),

reply_markup=keyboard)

def onfifth1_no(e):

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 1, 'answer'))

if fsm.current in finals:

fsm.go_to_start()

return

def onfifth2(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 2, 'question'),

reply_markup=keyboard)

def onfifth2_no(e):

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 2, 'answer'))

if fsm.current in finals:

fsm.go_to_start()

return

def onfifth3(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 3, 'question'),

reply_markup=keyboard)

def onfifth4(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 4, 'question'),

reply_markup=keyboard)

def onfifth4_no(e):

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 3, 'answer'))

if fsm.current in finals:

fsm.go_to_start()

return

def onfifth5(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 5, 'question'),

reply_markup=keyboard)

def onfifth6(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 6, 'question'),

reply_markup=keyboard)

def onfifth7(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 7, 'question'),

reply_markup=keyboard)

def onfifth8(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 8, 'question'),

reply_markup=keyboard)

def onfifth9(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 9, 'question'),

reply_markup=keyboard)

def onfifth10(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 10, 'question'),

reply_markup=keyboard)

def onfifth11(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 11, 'question'),

reply_markup=keyboard)

def onfifth12(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 12, 'question'),

reply_markup=keyboard)

def onfifth13(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 13, 'question'),

reply_markup=keyboard)

def onfifth14(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 14, 'question'),

reply_markup=keyboard)

def onfifth15(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 15, 'question'),

reply_markup=keyboard)

def onfifth16(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 16, 'question'),

reply_markup=keyboard)

def onfifth17(e):

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 4, 'answer'))

if fsm.current in finals:

fsm.go_to_start()

return

def onfifth_5_16_no(e):

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(5, 5, 'answer'))

if fsm.current in finals:

fsm.go_to_start()

return

def onsixth1(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(6, 1, 'question'),

reply_markup=keyboard)

def onsixth2(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(6, 2, 'question'),

reply_markup=keyboard)

def onsixth2_yes(e):

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(6, 1, 'answer'))

if fsm.current in finals:

fsm.go_to_start()

return

def onsixth2_no(e):

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(6, 2, 'answer'))

if fsm.current in finals:

fsm.go_to_start()

return

def onsixth3(e):

keyboard = utils.select_keyboard("yes-no")

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(6, 3, 'question'),

reply_markup=keyboard)

def onsixth3_no(e):

bot.send_message(chat_id=chat_id,

text=response_storage.select_message(6, 3, 'answer'))

if fsm.current in finals:

fsm.go_to_start()

return

#Создаем объект бота

bot = telebot.TeleBot(config.token) #передаем в параметр уникальный токен нашего бота

fsm = create_fsm()

#Обработчик всех нажатий на кнопки

@bot.callback_query_handler(func=lambda call: True)

def callback_inline(call):

data = call.data #получаем значение, соответствующее кнопки(нажал кнопку 5 - получил в call.data значение 5).

#Далее, в соответствии с текущим состоянием(fsm.current) и значением, полученным после нажатия на кнопку,

# указываем в какое состояние необходимо перейти

if fsm.current == 'show_sections':

global section_number

section_number = int(data)

if section_number == 1:

fsm.selected_first()

return

if section_number == 2:

fsm.selected_second()

return

if section_number == 3:

fsm.selected_third()

return

if section_number == 4:

fsm.selected_fourth()

return

if section_number == 5:

fsm.selected_fifth()

return

if section_number == 6:

fsm.selected_sixth()

return

if fsm.current == 'first1':

if data == '1':

fsm.first1_to_first2()

return

if data == '2':

fsm.first1_to_no()

return

if fsm.current == 'first2':

if data == '1':

fsm.first2_to_yes()

return

if data == '2':

fsm.first2_to_no()

return

if data == '3':

fsm.first2_to_first3()

return

if fsm.current == 'first3':

if data == '1':

fsm.first3_to_yes()

return

if data == '2':

fsm.first3_to_first4()

return

if fsm.current == 'first4':

if data == '1':

fsm.first4_to_yes()

return

if data == '2':

fsm.first4_to_first5()

return

if fsm.current == 'first5':

if data == '1':

fsm.first5_to_yes()

return

if data == '2':

fsm.first5_to_first6()

return

if fsm.current == 'first6':

if data == '1':

fsm.first6_to_yes()

return

if data == '2':

fsm.first6_to_no()

return

if fsm.current == 'second1':

if data == '1':

fsm.second_to_partnership()

return

if data == '2':

fsm.second1_to_second2()

return

if fsm.current == 'second2':

if data == '1':

fsm.second_to_partnership()

return

if data == '2':

fsm.second2_to_second3()

return

if fsm.current == 'second3':

if data == '1':

fsm.second_to_partnership()

return

if data == '2':

fsm.second3_to_second4()

return

if fsm.current == 'second4':

if data == '1':

fsm.second_to_partnership()

return

if data == '2':

fsm.second4_to_second5()

return

if fsm.current == 'second5':

if data == '1':

fsm.second_to_partnership()

return

if data == '2':

fsm.second5_to_second6()

return

if fsm.current == 'second6':

if data == '1':

fsm.second_to_partnership()

return

if data == '2':

fsm.second6_to_second7()

return

if fsm.current == 'second7':

if data == '1':

fsm.second_to_partnership()

return

if data == '2':

fsm.second7_to_second8()

return

if fsm.current == 'second8':

if data == '1':

fsm.second_to_partnership()

return

if data == '2':

fsm.second8_to_second9()

return

if fsm.current == 'second9':

if data == '1':

fsm.second_to_partnership()

return

if data == '2':

fsm.second9_to_second10()

return

if fsm.current == 'second10':

if data == '1':

fsm.second_to_partnership()

return

if data == '2':

fsm.second10_to_no()

return

if fsm.current == 'partnership':

if data == '1':

fsm.partnership_to_tradename()

return

if data == '2':

fsm.partnership_to_partnership1()

return

if fsm.current == 'partnership1':

if data == '1':

fsm.partnership_to_tradename()

return

if data == '2':

fsm.partnership1_to_partnership2()

return

if fsm.current == 'partnership2':

if data == '1':

fsm.partnership_to_tradename()

return

if data == '2':

fsm.partnership2_to_partnership3()

return

if fsm.current == 'partnership3':

if data == '1':

fsm.partnership_to_tradename()

return

if data == '2':

fsm.partnership3_to_partnership4()

return

if fsm.current == 'partnership4':

if data == '1':

fsm.partnership_to_tradename()

return

if data == '2':

fsm.partnership4_to_partnership5()

return

if fsm.current == 'partnership5':

if data == '1':

fsm.partnership_to_tradename()

return

if data == '2':

fsm.partnership5_to_partnership6()

return

if fsm.current == 'partnership6':

if data == '1':

fsm.partnership_to_tradename()

return

if data == '2':

fsm.partnership6_to_partnership7()

return

if fsm.current == 'partnership7':

if data == '1':

fsm.partnership_to_tradename()

return

if data == '2':

fsm.partnership7_to_partnership8()

return

if fsm.current == 'partnership8':

if data == '1':

fsm.partnership_to_tradename()

return

if data == '2':

fsm.partnership8_to_partnership9()

return

if fsm.current == 'partnership9':

if data == '1':

fsm.partnership_to_tradename()

return

if data == '2':

fsm.partnership9_to_no()

return

if fsm.current == 'tradename':

if data == '1':

fsm.tradename_to_tradename2()

return

if data == '2':

fsm.tradename_to_tradename1()

return

if fsm.current == 'tradename1':

if data == '1':

fsm.tradename1_to_tradename2()

return

if data == '2':

fsm.tradename1_to_tradename1_no()

return

if fsm.current == 'tradename2':

if data == '1':

fsm.tradename2_to_tradename3()

return

if data == '2':

fsm.tradename2_to_tradename2_no()

return

if fsm.current == 'tradename3':

if data == '1':

fsm.tradename3_to_tradename3_yes()

return

if data == '2':

fsm.tradename3_to_tradename3_no()

return

if fsm.current == 'third1':

if data == '1':

fsm.third1_to_third2()

return

if data == '2':

fsm.third1_to_no()

return

if fsm.current == 'third2':

if data == '1':

fsm.third2_to_third3()

return

if data == '2':

fsm.third2_to_no()

return

if fsm.current == 'third3':

if data == '1':

fsm.third3_to_third4()

return

if data == '2':

fsm.third3_to_no()

return

if fsm.current == 'third4':

if data == '1':

fsm.third4_to_third5()

return

if data == '2':

fsm.third_4_16_to_no()

return

if fsm.current == 'third5':

if data == '1':

fsm.third5_to_third6()

return

if data == '2':

fsm.third_4_16_to_no()

return

if fsm.current == 'third6':

if data == '1':

fsm.third6_to_third7()

return

if data == '2':

fsm.third_4_16_to_no()

return

if fsm.current == 'third7':

if data == '1':

fsm.third7_to_third8()

return

if data == '2':

fsm.third_4_16_to_no()

return

if fsm.current == 'third8':

if data == '1':

fsm.third8_to_third9()

return

if data == '2':

fsm.third_4_16_to_no()

return

if fsm.current == 'third9':

if data == '1':

fsm.third9_to_third10()

return

if data == '2':

fsm.third_4_16_to_no()

return

if fsm.current == 'third10':

if data == '1':

fsm.third10_to_third11()

return

if data == '2':

fsm.third_4_16_to_no()

return

if fsm.current == 'third11':

if data == '1':

fsm.third11_to_third12()

return

if data == '2':

fsm.third_4_16_to_no()

return

if fsm.current == 'third12':

if data == '1':

fsm.third12_to_third13()

return

if data == '2':

fsm.third_4_16_to_no()

return

if fsm.current == 'third13':
1   2   3   4   5   6   7


написать администратору сайта