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_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_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 send_welcome(message): if (message.chat.id != feedBack_target_chat): return check = trafficController.check_spam(message.chat.id) if check == "OK": process.respond_to_user_ID(message.chat.id) trafficController.drop_check(message.chat.id)
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) if check == "OK": bot.send_message(message.chat.id, MSGs.greetings, reply_markup=MSGs.enter_userpass_markup, parse_mode='HTML') users.add_user(message) trafficController.drop_check(message.chat.id)
def test_callback(call): bot.answer_callback_query(call.id) if users.know_user(call.from_user.id) == False: return check = trafficController.check_spam(call.from_user.id) if check == "OK": process.process_user_call(call) trafficController.drop_check(call.from_user.id)
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')
def send_welcome(message): check = trafficController.check_spam(message.chat.id) if check == "OK": process.cancel_action(message.chat.id) trafficController.drop_check(message.chat.id)
def send_welcome(message): check = trafficController.check_spam(message.chat.id) if check == "OK": process.get_feedback(message.chat.id) trafficController.drop_check(message.chat.id)
def send_welcome(message): check = trafficController.check_spam(message.chat.id) if check == "OK": process.send_help_MSG(message.chat.id) trafficController.drop_check(message.chat.id)
def send_welcome(message): check = trafficController.check_spam(message.chat.id) if check == "OK": process.renew_account_books(message.chat.id) trafficController.drop_check(message.chat.id)
def text_MSG(message): check = trafficController.check_spam(message.chat.id) if check == "OK": process.process_user_MSG(message) trafficController.drop_check(message.chat.id)