Ejemplo n.º 1
0
def handle_command(message):
    bot.send_chat_action(message.chat.id, "typing")
    answer = news.subscribeNews(message.chat.id)
    sendAnswer(message, answer)

    if (type(answer) is dict and answer['type'] == 'chooseRegion'):
        bot.register_next_step_handler(message, saveUserNewsRegion)

    logger.consoleLog(message, answer)
Ejemplo n.º 2
0
def handle_command(message):
    bot.send_chat_action(message.chat.id,"typing")
    answer = price_checking.get_items_prices(message.chat.id)
    bot.send_message(message.chat.id, answer)
    logger.consoleLog(message, answer)
Ejemplo n.º 3
0
def handle_command(message):
    bot.send_chat_action(message.chat.id, "typing")
    answer = weather.unsubscribeWeather(message.chat.id)
    bot.send_message(message.chat.id, answer)
    logger.consoleLog(message, answer)
Ejemplo n.º 4
0
def input_index_of_url(message):
    answer = price_checking.delete_item_url(message)
    bot.send_message(message.chat.id,answer)
    logger.consoleLog(message, answer)
Ejemplo n.º 5
0
def handle_command(message):
    bot.send_chat_action(message.chat.id, "typing")
    answer = neuro.openai(message)
    bot.send_message(message.chat.id, answer)
    logger.consoleLog(message, answer)
Ejemplo n.º 6
0
def saveUserNewsRegion(message):
    bot.send_chat_action(message.chat.id, "typing")
    answer = locations.saveLocation('news', message)
    sendAnswer(message, answer)
    logger.consoleLog(message, answer)