Exemplo n.º 1
0
def choose_meme(message):
    send_in_analytics({
        'text': message.text,
        'userId': str(message.from_user.id),
        "intent": {
            "name": "MEME CREATION",
            "inputs": [{
                "name": "query",
                "value": message.text
            }]
        }
    })
    page = 0
    markup = generate_page_inline_layout(page)  # Setup inline keyboard markup
    msg = bot.send_message(message.chat.id,
                           'Select the meme from database',
                           reply_markup=markup)
    send_out_analytics({
        'text': msg.text,
        'userId': str(message.from_user.id),
        "intent": {
            "name": "MEME CREATION",
            "inputs": [{
                "name": "select meme menu",
                "value": msg.text
            }]
        }
    })
Exemplo n.º 2
0
def back_to_menu(call):
    page = 0
    markup = generate_page_inline_layout(page)  # Setup inline keyboard markup
    bot.send_message(call.message.chat.id,
                     'Select the meme from database',
                     reply_markup=markup)
    bot.delete_message(call.message.chat.id, call.message.message_id)
Exemplo n.º 3
0
def choose_page_left(call):
    markup = generate_page_inline_layout(int(str(call.data)[4]) - 1)
    bot.edit_message_reply_markup(call.message.chat.id, call.message.message_id, reply_markup=markup)