def test_FUNC(message): check = trafficController.check_spam(message.chat.id, 'inc_credit') if check == "OK": response = users.STARTincreasing_credit(message.chat.id) if response is not None: bot.send_message(message.chat.id, response) trafficController.finished_process(message.chat.id, 'inc_credit')
def COMM_set_auto_res(message): check = trafficController.check_spam(message.chat.id, 'COMM_get_pri') if check == "OK": response = users.STARTset_auto_res(message.chat.id) if response is not None: bot.send_message(message.chat.id, response) trafficController.finished_process(message.chat.id, 'COMM_get_pri')
def COMM_ordermeal(message): check = trafficController.check_spam(message.chat.id, 'COMM_ordermeal') if check == "OK": response = users.STARTorder_meal(message.chat.id) if response is not None: bot.send_message(message.chat.id, response) trafficController.finished_process(message.chat.id, 'COMM_ordermeal')
def COMM_thisweek(message): check = trafficController.check_spam(message.chat.id, 'COMM_thisweek') if check == "OK": response = users.this_week_data(message.chat.id) if response is not None: bot.send_message(message.chat.id, response) trafficController.finished_process(message.chat.id, 'COMM_thisweek')
def COMM_fcode(message): check = trafficController.check_spam(message.chat.id, 'COMM_fcode') if check == "OK": response = users.forgotten_code(message.chat.id) if response is not None: bot.send_message(message.chat.id, response) trafficController.finished_process(message.chat.id, 'COMM_fcode')
def test_FUNC(message): check = trafficController.check_spam(message.chat.id, 'set_places') if check == "OK": response = users.extract_DINING_places(message.chat.id) if response is not None: bot.send_message(message.chat.id, response) trafficController.finished_process(message.chat.id, 'set_places')
def send_welcome(message): check = trafficController.check_spam(message.chat.id, 'start') if check == "OK": bot.send_message(message.chat.id, MSGs.greetings, reply_markup=MSGs.enter_userpass_markup, parse_mode='HTML') users.add_user(message.chat.id) print dataBase.check_the_user_in_DB(message) users.clear_PLCs(message.chat.id) trafficController.finished_process(message.chat.id, 'start')