Ejemplo n.º 1
0
async def recipe(ctx, *, name=''):
    """Get the prestige recipes of a character"""
    async with ctx.typing():
        if name.startswith('--raw '):
            name = re.sub('^--raw[ ]+', '', name)
            prestige_txt, success = p.get_prestige(name, 'to', raw=True)
        else:
            prestige_txt, success = p.get_prestige(name, 'to', raw=False)
        if success is True:
            for txt in prestige_txt:
                await ctx.send(txt)
        else:
            await ctx.send(f'Failed to find a recipe for crew "{name}" (note that item recipes now use the `/ingredients` command)')
Ejemplo n.º 2
0
async def recipe(ctx, *, name=''):
    """Get the prestige recipes of a character"""
    async with ctx.typing():
        if len(name) > 6:
            if name[:6] == '--raw ':
                name = name[6:]
                prestige_txt, success = p.get_prestige(name, 'to', raw=True)
        else:
            prestige_txt, success = p.get_prestige(name, 'to', raw=False)
        if success is True:
            for txt in prestige_txt:
                await ctx.send(txt)
        else:
            await ctx.send(f'Failed to find a recipe for {name}')
Ejemplo n.º 3
0
async def recipe(ctx, *, name=None):
    """Get the prestige recipes of a character or ingredients for an item"""
    if name is None:
        help_txt = 'Enter: {}recipe [name]'.format(command_prefix)
        await ctx.send(help_txt)
        return

    # write_log(command_prefix + 'recipe {}'.format(name), ctx.author, ctx.server)
    recipe_found = False

    # Character Recipe
    prestige_txt, success = p.get_prestige(name, 'to', tbl_i2n, tbl_n2i)
    if success is True:
        for txt in prestige_txt:
            await ctx.send(txt)
        recipe_found = True
        return

    # Item Recipe
    content, real_name = mkt.get_item_recipe(name, levels=5)
    if real_name is not None:
        content = '**Recipe for {}**\n'.format(real_name) + content
        content = content + '\n\nNote: bux prices listed here may not always be accurate due to transfers between alts/friends or other reasons'
        await ctx.send(content)
        recipe_found = True

    if recipe_found is False:
        await ctx.send(
            "Could not find character or item named '{}'".format(name))
Ejemplo n.º 4
0
async def prestige(ctx, *, name: str = None):
    """Get the prestige combinations of the character specified"""
    if name is None:
        help_txt = 'Enter: {}prestige [character name]'.format(command_prefix)
        await ctx.send(help_txt)
        return

    # write_log(command_prefix + 'prestige {}'.format(name), ctx.author, ctx.server)
    # print("Calling p.prestige({}, 'from', tbl_i2n, tbl_n2i)".format(name))
    prestige_txt, success = p.get_prestige(name, 'from', tbl_i2n, tbl_n2i)
    # print("prestige_txt = {}".format(prestige_txt))
    # print("success = {}".format(success))
    for txt in prestige_txt:
        await ctx.send(txt)
Ejemplo n.º 5
0
async def prestige(ctx, *, name):
    """Get the prestige combinations of the character specified"""
    prestige_txt, success = p.get_prestige(name, 'from')
    for txt in prestige_txt:
        await ctx.send(txt)