示例#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')
示例#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')
示例#3
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')
示例#4
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')
示例#5
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')
示例#6
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')
示例#7
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')