Exemple #1
0
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')
Exemple #2
0
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')
Exemple #3
0
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')
Exemple #4
0
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')
Exemple #5
0
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)
Exemple #6
0
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')
Exemple #7
0
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')
Exemple #8
0
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)
Exemple #9
0
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)
Exemple #10
0
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')
Exemple #11
0
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)
Exemple #12
0
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)
Exemple #13
0
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)
Exemple #14
0
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)
Exemple #15
0
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)