示例#1
0
文件: bot.py 项目: tkdgh7063/R6Bot
async def 오퍼전적(ctx, name, oper, platform="UPLAY"):
    auth = func.get_Auth()
    plat = func.get_Plat(str(platform))
    player = await auth.get_player(str(name), plat)
    operator = await player.get_operator(str(oper))
    embed = discord.Embed()
    embed.title = player.name + "의 " + str(oper).upper() + " 전적"
    embed.colour = discord.Colour.green()
    embed.set_thumbnail(url=func.BADGE[str(oper).upper()])
    embed.add_field(name="경험치", value=operator.xp, inline=True)
    embed.add_field(name="플레이 타임",
                    value=func.get_time_str(operator.time_played),
                    inline=True)
    embed.add_field(
        name="라운드",
        value="승리: " + str(operator.wins) + " / 패배: " + str(operator.losses) +
        "\n승률: " +
        str(round(operator.wins /
                  (operator.wins + operator.losses) * 100, 2)) + "%",
        inline=False)
    embed.add_field(name="전투",
                    value="사살: " + str(operator.kills) + " / 사망: " +
                    str(operator.deaths) + "\nKD: " +
                    str(round(operator.kills / operator.deaths, 2)),
                    inline=False)
    embed.add_field(name=func.STAT[str(oper).upper()],
                    value=operator.statistic,
                    inline=False)
    await ctx.send(embed=embed)
示例#2
0
文件: bot.py 项目: tkdgh7063/R6Bot
async def 캐주얼(ctx, name, platform="UPLAY"):
    auth = func.get_Auth()
    plat = func.get_Plat(platform)
    player = await auth.get_player(str(name), str(plat))
    await player.load_queues()
    embed = discord.Embed(title=player.name + "의 캐주얼 전적",
                          colour=discord.Colour.green())
    embed.set_thumbnail(url=player.icon_url)
    time_str = func.get_time_str(player.casual.time_played)
    embed.add_field(name="플레이 시간", value=time_str)
    embed.add_field(
        name="매치",
        value="승리: " + str(player.casual.won) + "/ 패배: " +
        str(player.casual.lost) + "\n승률: " +
        str(round(player.casual.won / player.casual.played * 100, 2)) + "%",
        inline=False)
    embed.add_field(name="전투",
                    value="사살: " + str(player.casual.kills) + " / 사망: " +
                    str(player.casual.deaths) + "\nKD: " +
                    str(round(player.casual.kills / player.casual.deaths, 2)) +
                    "\n경기당 킬: " +
                    str(round(player.casual.kills / player.casual.played, 2)) +
                    "킬",
                    inline=False)
    await ctx.send(embed=embed)
示例#3
0
文件: bot.py 项目: tkdgh7063/R6Bot
async def 랭크(ctx, name, region=api.RankedRegions.ASIA, platform="UPLAY"):
    auth = func.get_Auth()
    plat = func.get_Plat(str(platform))
    reg = func.get_Region(region)
    player = await auth.get_player(str(name), plat)
    await player.load_queues()
    ranks = await player.get_rank(region=reg)
    embed = discord.Embed(title=player.name + "의 랭크 전적",
                          colour=discord.Colour.green())
    embed.set_thumbnail(url=ranks.get_icon_url())
    time_str = func.get_time_str(player.ranked.time_played)
    embed.add_field(name="플레이 시간", value=time_str)
    embed.add_field(
        name="매치",
        value="승리: " + str(player.ranked.won) + "/ 패배: " +
        str(player.ranked.lost) + "\n승률: " +
        str(round(player.ranked.won / player.ranked.played * 100, 2)) + "%",
        inline=False)
    embed.add_field(name="전투",
                    value="사살: " + str(player.ranked.kills) + " / 사망: " +
                    str(player.ranked.deaths) + "\nKD: " +
                    str(round(player.ranked.kills / player.ranked.deaths, 2)) +
                    "\n경기당 킬: " +
                    str(round(player.ranked.kills / player.ranked.played, 2)) +
                    "킬",
                    inline=False)
    await ctx.send(embed=embed)
示例#4
0
文件: bot.py 项目: tkdgh7063/R6Bot
async def 정보(ctx, name, plat="UPLAY"):
    player = await func.get_info(name, plat)
    await player.load_level()
    await player.load_general()
    embed = discord.Embed(colour=discord.Colour.green())
    embed.set_thumbnail(url=player.icon_url)
    embed.title = player.name + "의 전적 개요"
    time_str = func.get_time_str(player.time_played)
    embed.add_field(name="닉네임", value=player.name, inline=True)
    embed.add_field(name="레벨", value=player.level, inline=True)
    embed.add_field(name="플레이시간", value=time_str, inline=True)
    embed.add_field(
        name="매치",
        value="승리: " + str(player.matches_won) + " / 패배: " +
        str(player.matches_lost) + "\n승률: " +
        str(round(player.matches_won / player.matches_played * 100, 2)) + "%",
        inline=False)
    embed.add_field(name="전투",
                    value="사살: " + str(player.kills) + "(헤드샷:" +
                    str(player.headshots) + ")" + " / 사망: " +
                    str(player.deaths) + "\nKD: " +
                    str(round(player.kills / player.deaths, 2)) + "\n헤드샷비율: " +
                    str(round(player.headshots / player.kills * 100, 2)) + "%",
                    inline=False)
    embed.add_field(name="기타",
                    value="사살 지원: " + str(player.kill_assists) + " / 관통 사살: " +
                    str(player.penetration_kills) + "\n근접 사살: " +
                    str(player.melee_kills) + " / 소생: " + str(player.revives),
                    inline=False)
    await ctx.send(embed=embed)
示例#5
0
文件: bot.py 项目: tkdgh7063/R6Bot
async def 수비오퍼킬뎃(ctx, name, num=2, plat="UPLAY"):
    auth = func.get_Auth()
    platform = func.get_Plat(plat)
    player = await auth.get_player(str(name), platform)
    operators = await player.get_all_operators()
    res = func.get_topDefKD(operators, num)
    embed = discord.Embed()
    embed.title = player.name + "의 킬뎃순 공격대원"
    embed.colour = discord.Colour.green()
    embed.set_thumbnail(url=player.icon_url)
    for i in range(num):
        embed.add_field(
            name=res[i][0].upper() + "(" + func.KR_NAME[res[i][0].upper()] +
            ")",
            value="KD: " + str(res[i][1]) + "\n플레이 타임: " +
            str(func.get_time_str(operators[res[i][0]].time_played)) +
            "\n승률: " + str(
                round(
                    operators[res[i][0]].wins /
                    (operators[res[i][0]].wins + operators[res[i][0]].losses) *
                    100, 2)) + "%",
            inline=False)
    await ctx.send(embed=embed)