Ejemplo n.º 1
0
def search():
    print("searching")
    text = request.form["text"]

    # busco los episodios que hagan match
    episodes = get_episodes(text)
    characters = get_characters(text)
    locations = get_locations(text)

    return render_template('search.html',
                           text=text,
                           episodes=episodes,
                           characters=characters,
                           locations=locations)
Ejemplo n.º 2
0
def locations(app, call):
    pkmn = re.split('/', call.data)[1]
    form = re.split('/', call.data)[2]

    text = func.get_locations(data, pkmn)

    markup = InlineKeyboardMarkup(
        [[
            InlineKeyboardButton(text='⚔️ Moveset',
                                 callback_data='moveset/' + pkmn + '/' + form)
        ],
         [
             InlineKeyboardButton(text='🔙 Back to basic infos',
                                  callback_data='basic_infos/' + pkmn + '/' +
                                  form)
         ]])

    func.bot_action(app, call, text, markup)
Ejemplo n.º 3
0
def show_map():
    "Get the map of our small world."
    other_locs = fn.get_locations(MAP, [POSITION])
    msg = f"Your current location is {POSITION}. There are also {other_locs}."
    return jsonify({'description': msg})