@sjtdev/koishi-plugin-dota2tracker 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +22 -18
- package/package.json +2 -3
- package/readme.md +2 -3
- package/template/guild_member/guild_member.ejs +1 -0
- package/template/hero/hero_1.ejs +4 -3
- package/template/match/match_1.ejs +10 -7
- package/template/match/match_2.ejs +7 -4
- package/template/player/player_1.ejs +2 -1
- package/template/rank/rank_fun.ejs +13 -6
- package/template/report/daily.ejs +4 -3
- package/queries/AllAbilitiesChineseName.graphql +0 -14
- package/queries/CurrentGameversion.graphql +0 -8
- package/queries/HeroInfo.graphql +0 -53
- package/template/rank/rank.ejs +0 -35
package/lib/index.js
CHANGED
|
@@ -589,35 +589,35 @@ var require_en_US_command = __commonJS({
|
|
|
589
589
|
// src/locales/en-US.template.yml
|
|
590
590
|
var require_en_US_template = __commonJS({
|
|
591
591
|
"src/locales/en-US.template.yml"(exports2, module2) {
|
|
592
|
-
module2.exports = { dota2tracker: { template: { radiant: "Radiant", dire: "Dire", won: "Won", lost: "Lost", match_id_: "Match ID: {0}", game_mode_: "Mode: {0}", start_time_: "Start Time: {0}", end_time_: "End Time: {0}", pick_order: "#{0}", random: "R", hero_damage_: "Damage: {0}", building_damage_: "Building: {0}", damage_received_: "Received: {0}", lasthit_: "LastHit: {0}", deny_: "Deny: {0}", "lh/dn_": "LH/DN: {0}", GPM: "GPM", XPM: "XPM", heal_: "Heal: {0}", crowd_control_duration_: "CCD: {0}", "GPM/XPM_": "GPM/XPM: {0}", lane: "Lane", lane_: "Lane: ", lane_advantage: "Lane +", lane_disadvantage: "Lane -", lane_jungle: "Jungle", lane_stomp: "Lane+++", lane_stomped: "Lane---", lane_tie: "Lane ==", analysis_successful: "Analysis successful", analysis_incomplete: "Analysis incomplete", kill: "Kill", kill_contribution_: "KC: {0}", position: "Position", position_: "Position: ", position_1: "Carry", position_2: "Mid", position_3: "OffLane", position_4: "Softsup", position_5: "Hardsup", dire_won: "Dire Won", radiant_won: "Radiant Won", total_damage: "Damage", total_experience: "Exp.", total_gold: "Gold", region_: "Region: {0}", duration_: "Duration: {0}", position_undefined: "?", top10_: "Top 10 Heroes by Matches: ", match_count_: "Matches: ", last25matches_: "Last 25 Matches: ", winrate_: "Winrate: ", imp_: "IMP: ", lane_advantage_rate_: "Lane Advantage Rate: ", hero: "Hero", all_matches_: "All Matches: ", match_count: "Matches", winrate: "Winrate", imp: "IMP", win_count: "Wins", lose_count: "Losses", recently_heroes: "Heroes used more than once recently: ", recently_positions: "Performance in the last 25 matches across all positions: ", winning_streak: "Winning Streak", losing_streak: "Losing Streak", id: "ID", mode: "Mode", kda_kc: "KDA(KC)", time: "Time", duration: "Duration", rank: "Rank", un_parsed: "(Unparsed)", combined_win_loss_summary: "Combined Win/Loss Summary: ", yesterdays_summary: "Yesterday's Summary", last_weeks_summary: "Last Week's Summary", report_won: "W", report_lost: "L", report_winrate: "WR", anonymous_player_1: "This profile is private.", anonymous_player_2: "Background is for display purposes only. It is not {player}’s data." } } };
|
|
592
|
+
module2.exports = { dota2tracker: { template: { radiant: "Radiant", dire: "Dire", won: "Won", lost: "Lost", match_id_: "Match ID: {0}", game_mode_: "Mode: {0}", start_time_: "Start Time: {0}", end_time_: "End Time: {0}", pick_order: "#{0}", random: "R", hero_damage_: "Damage: {0}", building_damage_: "Building: {0}", damage_received_: "Received: {0}", lasthit_: "LastHit: {0}", deny_: "Deny: {0}", "lh/dn_": "LH/DN: {0}", GPM: "GPM", XPM: "XPM", heal_: "Heal: {0}", crowd_control_duration_: "CCD: {0}", "GPM/XPM_": "GPM/XPM: {0}", lane: "Lane", lane_: "Lane: ", lane_advantage: "Lane +", lane_disadvantage: "Lane -", lane_jungle: "Jungle", lane_stomp: "Lane+++", lane_stomped: "Lane---", lane_tie: "Lane ==", analysis_successful: "Analysis successful", analysis_incomplete: "Analysis incomplete", kill: "Kill", kill_contribution_: "KC: {0}", position: "Position", position_: "Position: ", position_1: "Carry", position_2: "Mid", position_3: "OffLane", position_4: "Softsup", position_5: "Hardsup", dire_won: "Dire Won", radiant_won: "Radiant Won", total_damage: "Damage", total_experience: "Exp.", total_gold: "Gold", region_: "Region: {0}", duration_: "Duration: {0}", position_undefined: "?", top10_: "Top 10 Heroes by Matches: ", match_count_: "Matches: ", last25matches_: "Last 25 Matches: ", winrate_: "Winrate: ", imp_: "IMP: ", lane_advantage_rate_: "Lane Advantage Rate: ", hero: "Hero", all_matches_: "All Matches: ", match_count: "Matches", winrate: "Winrate", imp: "IMP", win_count: "Wins", lose_count: "Losses", recently_heroes: "Heroes used more than once recently: ", recently_positions: "Performance in the last 25 matches across all positions: ", winning_streak: "Winning Streak", losing_streak: "Losing Streak", id: "ID", mode: "Mode", kda_kc: "KDA(KC)", time: "Time", duration: "Duration", rank: "Rank", un_parsed: "(Unparsed)", combined_win_loss_summary: "Combined Win/Loss Summary: ", yesterdays_summary: "Yesterday's Summary", last_weeks_summary: "Last Week's Summary", report_won: "W", report_lost: "L", report_winrate: "WR", anonymous_player_1: "This profile is private.", anonymous_player_2: "Background is for display purposes only. It is not {player}’s data.", rank_fun_down_message: "{avatar}<br/>Sad", rank_fun_up_message: "Hip hip hooray! Our awesome member {avatar}{name} has leveled up from {prev} to {curr}!" } } };
|
|
593
593
|
}
|
|
594
594
|
});
|
|
595
595
|
|
|
596
596
|
// src/locales/en-US.yml
|
|
597
597
|
var require_en_US = __commonJS({
|
|
598
598
|
"src/locales/en-US.yml"(exports2, module2) {
|
|
599
|
-
module2.exports = { dota2tracker: { heroes_nicknames: { "0": 'Please strictly follow the format of "", "" when filling out, if the format is incorrect, only the default name of the hero will be used. The default name of the hero may be omitted.', "1": '"Anti-Mage"', "2": '"Axe"', "3": '"Bane"', "4": '"Bloodseeker"', "5": '"Crystal Maiden"', "6": '"Drow Ranger"', "7": '"Earthshaker"', "8": '"Juggernaut"', "9": '"Mirana"', "10": '"Morphling"', "11": '"Shadow Fiend"', "12": '"Phantom Lancer"', "13": '"Puck"', "14": '"Pudge"', "15": '"Razor"', "16": '"Sand King"', "17": '"Storm Spirit"', "18": '"Sven"', "19": '"Tiny"', "20": '"Vengeful Spirit"', "21": '"Windranger"', "22": '"Zeus"', "23": '"Kunkka"', "25": '"Lina"', "26": '"Lion"', "27": '"Shadow Shaman"', "28": '"Slardar"', "29": '"Tidehunter"', "30": '"Witch Doctor"', "31": '"Lich"', "32": '"Riki"', "33": '"Enigma"', "34": '"Tinker"', "35": '"Sniper"', "36": '"Necrophos"', "37": '"Warlock"', "38": '"Beastmaster"', "39": '"Queen of Pain"', "40": '"Venomancer"', "41": '"Faceless Void"', "42": '"Wraith King"', "43": '"Death Prophet"', "44": '"Phantom Assassin"', "45": '"Pugna"', "46": '"Templar Assassin"', "47": '"Viper"', "48": '"Luna"', "49": '"Dragon Knight"', "50": '"Dazzle"', "51": '"Clockwerk"', "52": '"Leshrac"', "53": `"Nature's Prophet"`, "54": '"Lifestealer"', "55": '"Dark Seer"', "56": '"Clinkz"', "57": '"Omniknight"', "58": '"Enchantress"', "59": '"Huskar"', "60": '"Night Stalker"', "61": '"Broodmother"', "62": '"Bounty Hunter"', "63": '"Weaver"', "64": '"Jakiro"', "65": '"Batrider"', "66": '"Chen"', "67": '"Spectre"', "68": '"Ancient Apparition"', "69": '"Doom"', "70": '"Ursa"', "71": '"Spirit Breaker"', "72": '"Gyrocopter"', "73": '"Alchemist"', "74": '"Invoker"', "75": '"Silencer"', "76": '"Outworld Devourer"', "77": '"Lycan"', "78": '"Brewmaster"', "79": '"Shadow Demon"', "80": '"Lone Druid"', "81": '"Chaos Knight"', "82": '"Meepo"', "83": '"Treant Protector"', "84": '"Ogre Magi"', "85": '"Undying"', "86": '"Rubick"', "87": '"Disruptor"', "88": '"Nyx Assassin"', "89": '"Naga Siren"', "90": '"Keeper of the Light"', "91": '"Io"', "92": '"Visage"', "93": '"Slark"', "94": '"Medusa"', "95": '"Troll Warlord"', "96": '"Centaur Warrunner"', "97": '"Magnus"', "98": '"Timbersaw"', "99": '"Bristleback"', "100": '"Tusk"', "101": '"Skywrath Mage"', "102": '"Abaddon"', "103": '"Elder Titan"', "104": '"Legion Commander"', "105": '"Techies"', "106": '"Ember Spirit"', "107": '"Earth Spirit"', "108": '"Underlord"', "109": '"Terrorblade"', "110": '"Phoenix"', "111": '"Oracle"', "112": '"Winter Wyvern"', "113": '"Arc Warden"', "114": '"Monkey King"', "119": '"Dark Willow"', "120": '"Pangolier"', "121": '"Grimstroke"', "123": '"Hoodwink"', "126": '"Void Spirit"', "128": '"Snapfire"', "129": '"Mars"', "131": '"Ring Master"', "135": '"Dawnbreaker"', "136": '"Marci"', "137": '"Primal Beast"', "138": '"Muerta"', "145": '"Kez"' }, broadcast: { WIN_NEGATIVE: `"Won the match by sheer luck", "Won the match by a stroke of bad luck", "Coasted to victory", "Didn't even show up for the team fight, but my teammates won 4v5"`, WIN_POSITIVE: '"Led the team to victory", "Dominated the opponents and secured the win", "Carried the game to victory", "Treated the opponents like pigs and won", "Won again; this game is just so monotonous and dull", "Simply achieved a win in the match"', LOSE_NEGATIVE: '"Got crushed and lost the match", "Lost the match miserably", "Got my head knocked sideways and lost the match with a blown mindset", "Went fishing but got eaten by the fish, lost the match", "Played terribly", "Simply suffered a loss in the match"', LOSE_POSITIVE: `"Lost the match with no way to turn it around", "Gave it my all, but still lost the match", "Though we lost, we still have honor", "Couldn't carry my teammates, lost the match", "Lost again, it hurts; I'd rather it be me losing"`, message: "{name}'s {hero_name} {comment}.\nKDA: {kda}, GPM/XPM: {gpm_xpm}, Last Hits/Denies: {lh_dn}, Damage/Tower Damage: {damage}, Kill/Death Contribution Rate: {kc_dc}" }, logger: { fetch_guilds_failed: "Failed to fetch guild information.", match_tracked: "Tracked the latest unreported match {match.id} from group {#each messageToLogger as item}{item.platform}:{item.guildId} for users [{#each item.players as player}{player.nickName}({player.steamId}){#if player === item.players[item.players.length - 1]}{/if}{#if player !== item.players[item.players.length - 1]} and {/if}{/each}]{#if item !== messageToLogger[messageToLogger.length - 1]}, {/if}{/each}.", parse_request_sent: "The parsing request for match {matchId} has been successfully sent to the STRATZ server.", parse_request_failed: "The parsing request for match {matchId} failed to send.", match_parsed: "Match {matchId} has been parsed, an image was generated and published to {#each guilds as guild}{guild.platform}:{guild.guildId}{#if guild !== guilds[guilds.length - 1]}, {/if}{/each}.", match_unparsed: "Match {matchId} exceeded the waiting time [{timeout}] and remains unparsed, an image was generated and published to {#each guilds as guild}{guild.platform}:{guild.guildId}{#if guild !== guilds[guilds.length - 1]}, {/if}{/each}.", waiting_for_parse: "Match {matchId} is still being parsed, continue waiting.", report_sent: "Posted {title} on {platform}:{guildId}.", rank_sent: "Posted rank change information of {player.nickName} ({player.steamId}) on {platform}:{guildId}.", ejs_error: "Error rendering EJS template: {error}" } } };
|
|
599
|
+
module2.exports = { dota2tracker: { heroes_nicknames: { "0": 'Please strictly follow the format of "", "" when filling out, if the format is incorrect, only the default name of the hero will be used. The default name of the hero may be omitted.', "1": '"Anti-Mage"', "2": '"Axe"', "3": '"Bane"', "4": '"Bloodseeker"', "5": '"Crystal Maiden"', "6": '"Drow Ranger"', "7": '"Earthshaker"', "8": '"Juggernaut"', "9": '"Mirana"', "10": '"Morphling"', "11": '"Shadow Fiend"', "12": '"Phantom Lancer"', "13": '"Puck"', "14": '"Pudge"', "15": '"Razor"', "16": '"Sand King"', "17": '"Storm Spirit"', "18": '"Sven"', "19": '"Tiny"', "20": '"Vengeful Spirit"', "21": '"Windranger"', "22": '"Zeus"', "23": '"Kunkka"', "25": '"Lina"', "26": '"Lion"', "27": '"Shadow Shaman"', "28": '"Slardar"', "29": '"Tidehunter"', "30": '"Witch Doctor"', "31": '"Lich"', "32": '"Riki"', "33": '"Enigma"', "34": '"Tinker"', "35": '"Sniper"', "36": '"Necrophos"', "37": '"Warlock"', "38": '"Beastmaster"', "39": '"Queen of Pain"', "40": '"Venomancer"', "41": '"Faceless Void"', "42": '"Wraith King"', "43": '"Death Prophet"', "44": '"Phantom Assassin"', "45": '"Pugna"', "46": '"Templar Assassin"', "47": '"Viper"', "48": '"Luna"', "49": '"Dragon Knight"', "50": '"Dazzle"', "51": '"Clockwerk"', "52": '"Leshrac"', "53": `"Nature's Prophet"`, "54": '"Lifestealer"', "55": '"Dark Seer"', "56": '"Clinkz"', "57": '"Omniknight"', "58": '"Enchantress"', "59": '"Huskar"', "60": '"Night Stalker"', "61": '"Broodmother"', "62": '"Bounty Hunter"', "63": '"Weaver"', "64": '"Jakiro"', "65": '"Batrider"', "66": '"Chen"', "67": '"Spectre"', "68": '"Ancient Apparition"', "69": '"Doom"', "70": '"Ursa"', "71": '"Spirit Breaker"', "72": '"Gyrocopter"', "73": '"Alchemist"', "74": '"Invoker"', "75": '"Silencer"', "76": '"Outworld Devourer"', "77": '"Lycan"', "78": '"Brewmaster"', "79": '"Shadow Demon"', "80": '"Lone Druid"', "81": '"Chaos Knight"', "82": '"Meepo"', "83": '"Treant Protector"', "84": '"Ogre Magi"', "85": '"Undying"', "86": '"Rubick"', "87": '"Disruptor"', "88": '"Nyx Assassin"', "89": '"Naga Siren"', "90": '"Keeper of the Light"', "91": '"Io"', "92": '"Visage"', "93": '"Slark"', "94": '"Medusa"', "95": '"Troll Warlord"', "96": '"Centaur Warrunner"', "97": '"Magnus"', "98": '"Timbersaw"', "99": '"Bristleback"', "100": '"Tusk"', "101": '"Skywrath Mage"', "102": '"Abaddon"', "103": '"Elder Titan"', "104": '"Legion Commander"', "105": '"Techies"', "106": '"Ember Spirit"', "107": '"Earth Spirit"', "108": '"Underlord"', "109": '"Terrorblade"', "110": '"Phoenix"', "111": '"Oracle"', "112": '"Winter Wyvern"', "113": '"Arc Warden"', "114": '"Monkey King"', "119": '"Dark Willow"', "120": '"Pangolier"', "121": '"Grimstroke"', "123": '"Hoodwink"', "126": '"Void Spirit"', "128": '"Snapfire"', "129": '"Mars"', "131": '"Ring Master"', "135": '"Dawnbreaker"', "136": '"Marci"', "137": '"Primal Beast"', "138": '"Muerta"', "145": '"Kez"' }, broadcast: { WIN_NEGATIVE: `"Won the match by sheer luck", "Won the match by a stroke of bad luck", "Coasted to victory", "Didn't even show up for the team fight, but my teammates won 4v5"`, WIN_POSITIVE: '"Led the team to victory", "Dominated the opponents and secured the win", "Carried the game to victory", "Treated the opponents like pigs and won", "Won again; this game is just so monotonous and dull", "Simply achieved a win in the match"', LOSE_NEGATIVE: '"Got crushed and lost the match", "Lost the match miserably", "Got my head knocked sideways and lost the match with a blown mindset", "Went fishing but got eaten by the fish, lost the match", "Played terribly", "Simply suffered a loss in the match"', LOSE_POSITIVE: `"Lost the match with no way to turn it around", "Gave it my all, but still lost the match", "Though we lost, we still have honor", "Couldn't carry my teammates, lost the match", "Lost again, it hurts; I'd rather it be me losing"`, message: "{name}'s {hero_name} {comment}.\nKDA: {kda}, GPM/XPM: {gpm_xpm}, Last Hits/Denies: {lh_dn}, Damage/Tower Damage: {damage}, Kill/Death Contribution Rate: {kc_dc}", rank_changed: "Player {name} rank changed: {prev.medal}{prev.star} → {curr.medal}{curr.star}" }, logger: { fetch_guilds_failed: "Failed to fetch guild information.", match_tracked: "Tracked the latest unreported match {match.id} from group {#each messageToLogger as item}{item.platform}:{item.guildId} for users [{#each item.players as player}{player.nickName}({player.steamId}){#if player === item.players[item.players.length - 1]}{/if}{#if player !== item.players[item.players.length - 1]} and {/if}{/each}]{#if item !== messageToLogger[messageToLogger.length - 1]}, {/if}{/each}.", parse_request_sent: "The parsing request for match {matchId} has been successfully sent to the STRATZ server.", parse_request_failed: "The parsing request for match {matchId} failed to send.", match_parsed: "Match {matchId} has been parsed, an image was generated and published to {#each guilds as guild}{guild.platform}:{guild.guildId}{#if guild !== guilds[guilds.length - 1]}, {/if}{/each}.", match_unparsed: "Match {matchId} exceeded the waiting time [{timeout}] and remains unparsed, an image was generated and published to {#each guilds as guild}{guild.platform}:{guild.guildId}{#if guild !== guilds[guilds.length - 1]}, {/if}{/each}.", waiting_for_parse: "Match {matchId} is still being parsed, continue waiting.", report_sent: "Posted {title} on {platform}:{guildId}.", rank_sent: "Posted rank change information of {player.nickName} ({player.steamId}) on {platform}:{guildId}.", ejs_error: "Error rendering EJS template: {error}" } } };
|
|
600
600
|
}
|
|
601
601
|
});
|
|
602
602
|
|
|
603
603
|
// src/locales/zh-CN.command.yml
|
|
604
604
|
var require_zh_CN_command = __commonJS({
|
|
605
605
|
"src/locales/zh-CN.command.yml"(exports2, module2) {
|
|
606
|
-
module2.exports = { commands: { dota2tracker: { subscribe: { description: "
|
|
606
|
+
module2.exports = { commands: { dota2tracker: { subscribe: { description: "订阅本群。", usage: "订阅后还需玩家在本群绑定SteamID,BOT将订阅本群中已绑定玩家的新比赛数据,在STRATZ比赛解析完成后将比赛数据生成为图片战报发布至本群中。", messages: { subscribed: "本群已订阅,无需重复订阅。", subscribe_success: "订阅成功。" } }, unsubscribe: { description: "取消订阅本群。", messages: { unsubscribe_success: "取消订阅成功。", not_subscribed: "本群尚未订阅,无需取消订阅。" } }, bind: { description: "绑定SteamID,并起一个别名(也可以不起)。", usage: "将你的SteamID与你的账号绑定,若本群已订阅将会实时获取你的新比赛数据发布至群中。", examples: '绑定 123456789\n绑定 123456789 张三\n绑定 123456789 "张 三"', messages: { steam_id_invalid: "SteamID无效。", bind_success: "绑定成功,\nID:{userId}\n别名:{nickName}\nSteamID:{steamId}", bind_failed: "绑定失败,{0}", reason_without_match: "SteamID无效或无任何场次。", reason_fetch_failed: "网络状况不佳或其他原因无法验证SteamID,请稍后重试。", already_binded: "你已绑定,无需重复绑定。\n以下是你的个人信息:\nID:{userId}\n别名:{nickName}\nSteamID:{steamId}", nick_name_too_long: "别名过长,请限制在20个字符以内。(也可以留空)", is_anonymous: "请注意:你的Steam玩家数据并未公开,将无法使用BOT的主要功能,如“战报追踪”、“查询最近指令”等。\n如需公开数据,请在DOTA2游戏内设置中公开。" } }, unbind: { description: "取消绑定你的个人信息。", messages: { unbind_success: "取消绑定成功。", not_binded: "尚未绑定,无需取消绑定。" } }, rename: { description: "修改绑定时设定的别名。", examples: '改名 李四\n改名 "李 四"', messages: { rename_success: "改名成功,现在你叫{nick_name}了。", empty_input: "请输入你的别名。", not_binded: "请先绑定,绑定时即可设定别名。", nick_name_too_long: "别名过长,请限制在20个字符以内。" } }, "query-members": { description: "查询本群已绑定的玩家。", messages: { no_members: "本群尚无绑定玩家。", query_failed: "查询群友失败。" } }, "query-match": { description: "查询指定比赛ID的比赛数据,生成图片发布。", options: { parse: "-p 是否等待解析比赛数据" }, examples: "查询比赛 1234567890\n查询比赛 1234567890 -p\n查询比赛 1234567890 --parse", messages: { empty_input: "请输入比赛ID。", match_id_invalid: "比赛ID无效。", querying_match: "正在搜索对局详情,请稍后……", query_failed: "获取比赛数据失败。", waiting_for_parse: "比赛数据尚未解析,已发送解析请求到服务器,战报将在解析完成或超时后发送。" } }, "query-recent-match": { description: "查询最近的比赛数据,生成图片发布。", options: { parse: "-p 是否等待解析比赛数据" }, usage: "查询指定玩家的最近一场比赛的比赛数据,生成图片发布。\n参数可输入该玩家的SteamID或已在本群绑定玩家的别名,无参数时尝试查询调用指令玩家的SteamID。", examples: "查询最近比赛\n查询最近比赛 123456789\n查询最近比赛 张三\n查询最近比赛 123456789 -p\n查询最近比赛 张三 --parse", messages: { not_binded: "无参数时默认从已绑定SteamID玩家中寻找你的信息,但你似乎并没有绑定。\n请在本群绑定SteamID。(可输入【绑定 -h】获取帮助)\n或在指令后跟上希望查询的SteamID或已绑定玩家的别名。", steam_id_invalid: "SteamID无效并且未在本群找到此玩家。", querying_match: "正在搜索对局详情,请稍后……", query_failed: "获取玩家最近比赛失败。", not_in_group: "指令调用失败。\n当前不属于群聊状态,必须提供指定玩家的SteamID。", is_anonymous: "你的比赛数据未公开,无法获取最近比赛数据。\n如需公开数据,请在DOTA2游戏内设置中公开。" } }, "query-player": { description: "查询玩家的个人信息,可指定英雄。", options: { hero: "-o 查询玩家指定英雄使用情况(同查询英雄,可用别名或ID)" }, usage: "查询指定玩家的个人信息,生成图片发布,可指定英雄。\n参数可输入该玩家的SteamID或已在本群绑定玩家的别名,无参数时尝试查询调用指令玩家的SteamID。", examples: "查询玩家\n查询玩家 123456789\n查询玩家 张三\n查询玩家 张三 --hero 敌法师\n查询玩家 张三 -o 15", messages: { not_binded: "无参数时默认从已绑定SteamID玩家中寻找你的信息,但你似乎并没有绑定。\n请在本群绑定SteamID。(可输入【绑定 -h】获取帮助)\n或在指令后跟上希望查询的SteamID或已绑定玩家的别名。", steam_id_invalid: "SteamID无效并且未在本群找到此玩家。", querying_player: "正在获取玩家数据,请稍后……", query_failed: "获取玩家信息失败。", not_in_group: "指令调用失败。\n当前不属于群聊状态,必须提供指定玩家的SteamID。" } }, "query-hero": { description: "查询英雄技能/面板信息。", options: { random: "-r 随机选择英雄" }, usage: "查询英雄的技能说明与各项数据,生成图片发布。\n参数可输入英雄ID、英雄名、英雄常用别名。", examples: "查询英雄 15\n查询英雄 雷泽\n查询英雄 电魂", messages: { not_found: "未找到输入的英雄,请确认后重新输入。", querying_hero: "正在获取英雄数据,请稍后……", query_failed: "获取英雄数据失败。", empty_input: "请输入参数。" } } } } };
|
|
607
607
|
}
|
|
608
608
|
});
|
|
609
609
|
|
|
610
610
|
// src/locales/zh-CN.template.yml
|
|
611
611
|
var require_zh_CN_template = __commonJS({
|
|
612
612
|
"src/locales/zh-CN.template.yml"(exports2, module2) {
|
|
613
|
-
module2.exports = { dota2tracker: { template: { radiant: "天辉", dire: "夜魇", won: "获胜", lost: "失败", match_id_: "比赛编号:{0}", game_mode_: "模式:{0}", start_time_: "起始时间:{0}", end_time_: "结束时间:{0}", pick_order: "第{0}手", random: "随机", hero_damage_: "英雄伤害:{0}", building_damage_: "建筑伤害:{0}", damage_received_: "受到伤害:{0}", lasthit_: "补刀:{0}", deny_: "反补:{0}", "lh/dn_": "补刀:{0}/{1}", GPM: "GPM", XPM: "XPM", heal_: "治疗量:{0}", crowd_control_duration_: "控制时间:{0}", "GPM/XPM_": "GPM/XPM:{0}", lane: "对线", lane_: "对线:", lane_advantage: "对线优势", lane_disadvantage: "对线劣势", lane_stomp: "对线碾压", lane_stomped: "对线被碾", lane_tie: "对线平手", lane_jungle: "野区霸主", analysis_successful: "录像分析成功", analysis_incomplete: "分析结果不完整", kill: "击杀", kill_contribution_: "参战率:{0}", position: "位置", position_: "位置:", position_1: "优势路", position_2: "中路", position_3: "烈士路", position_4: "采灵芝", position_5: "工具人", position_undefined: "?", total_damage: "总伤害", total_gold: "总经济", total_experience: "总经验", radiant_won: "天辉获胜", dire_won: "夜魇获胜", duration_: "持续时间:{0}", region_: "地区:{0}", match_count_: "场次:", last25matches_: "最近25场:", winrate_: "胜率:", imp_: "表现:", lane_advantage_rate_: "线优率:", top10_: "全期场次前十的英雄:", hero: "英雄", all_matches_: "全期场次:", match_count: "场次", winrate: "胜率", imp: "表现", win_count: "胜场", lose_count: "败场", recently_heroes: "近期使用场次大于1的英雄:", recently_positions: "近25场各个位置的表现:", winning_streak: "连胜", losing_streak: "连败", id: "ID", mode: "模式", kda_kc: "KDA(参战率)", time: "时间", duration: "时长", rank: "段位", un_parsed: "(未解析)", combined_win_loss_summary: "组合胜负情况:", yesterdays_summary: "昨日总结", last_weeks_summary: "上周总结", report_won: "胜", report_lost: "负", report_winrate: "胜率", anonymous_player_1: "
|
|
613
|
+
module2.exports = { dota2tracker: { template: { radiant: "天辉", dire: "夜魇", won: "获胜", lost: "失败", match_id_: "比赛编号:{0}", game_mode_: "模式:{0}", start_time_: "起始时间:{0}", end_time_: "结束时间:{0}", pick_order: "第{0}手", random: "随机", hero_damage_: "英雄伤害:{0}", building_damage_: "建筑伤害:{0}", damage_received_: "受到伤害:{0}", lasthit_: "补刀:{0}", deny_: "反补:{0}", "lh/dn_": "补刀:{0}/{1}", GPM: "GPM", XPM: "XPM", heal_: "治疗量:{0}", crowd_control_duration_: "控制时间:{0}", "GPM/XPM_": "GPM/XPM:{0}", lane: "对线", lane_: "对线:", lane_advantage: "对线优势", lane_disadvantage: "对线劣势", lane_stomp: "对线碾压", lane_stomped: "对线被碾", lane_tie: "对线平手", lane_jungle: "野区霸主", analysis_successful: "录像分析成功", analysis_incomplete: "分析结果不完整", kill: "击杀", kill_contribution_: "参战率:{0}", position: "位置", position_: "位置:", position_1: "优势路", position_2: "中路", position_3: "烈士路", position_4: "采灵芝", position_5: "工具人", position_undefined: "?", total_damage: "总伤害", total_gold: "总经济", total_experience: "总经验", radiant_won: "天辉获胜", dire_won: "夜魇获胜", duration_: "持续时间:{0}", region_: "地区:{0}", match_count_: "场次:", last25matches_: "最近25场:", winrate_: "胜率:", imp_: "表现:", lane_advantage_rate_: "线优率:", top10_: "全期场次前十的英雄:", hero: "英雄", all_matches_: "全期场次:", match_count: "场次", winrate: "胜率", imp: "表现", win_count: "胜场", lose_count: "败场", recently_heroes: "近期使用场次大于1的英雄:", recently_positions: "近25场各个位置的表现:", winning_streak: "连胜", losing_streak: "连败", id: "ID", mode: "模式", kda_kc: "KDA(参战率)", time: "时间", duration: "时长", rank: "段位", un_parsed: "(未解析)", combined_win_loss_summary: "组合胜负情况:", yesterdays_summary: "昨日总结", last_weeks_summary: "上周总结", report_won: "胜", report_lost: "负", report_winrate: "胜率", anonymous_player_1: "数据未公开", anonymous_player_2: "背景仅供展示目的,不属于{player}的数据。", rank_fun_up_message: "热烈祝贺群友 {avatar}{name} 在天梯中再获进步,<br/>由 {prev} 升为 {curr},再接再厉,再创辉煌!", rank_fun_down_message: "{avatar}<br/>寄" } } };
|
|
614
614
|
}
|
|
615
615
|
});
|
|
616
616
|
|
|
617
617
|
// src/locales/zh-CN.yml
|
|
618
618
|
var require_zh_CN = __commonJS({
|
|
619
619
|
"src/locales/zh-CN.yml"(exports2, module2) {
|
|
620
|
-
module2.exports = { dota2tracker: { heroes_nicknames: { "0": '请严格遵循 "", "" 格式填写(如下方默认数据,注意是英文半角符号),如果格式有误将仅使用英雄默认名称。可以不包含英雄默认名称。', "1": '"敌法师", "敌法", "AM"', "2": '"斧王"', "3": '"祸乱之源", "祸乱", "水桶腰"', "4": '"血魔"', "5": '"水晶室女", "冰女", "CM"', "6": '"卓尔游侠", "小黑"', "7": '"撼地者", "小牛", "牛头"', "8": '"主宰", "剑圣", "jugg", "奶棒人"', "9": '"米拉娜", "白虎", "pom"', "10": '"变体精灵", "水人"', "11": '"影魔", "影魔王", "SF", "影儿魔儿"', "12": '"幻影长矛手", "PL"', "13": '"帕克"', "14": '"帕吉", "屠夫", "扒鸡", "啪唧"', "15": '"雷泽", "电魂", "电棍"', "16": '"沙王", "SK"', "17": '"风暴之灵", "蓝猫"', "18": '"斯温", "流浪剑客", "流浪"', "19": '"小小"', "20": '"复仇之魂", "复仇", "VS"', "21": '"风行者", "风行", "WR"', "22": '"宙斯"', "23": '"昆卡", "船长"', "25": '"莉娜", "火女"', "26": '"莱恩", "恶魔巫师", "Lion"', "27": '"暗影萨满", "小Y", "小歪"', "28": '"斯拉达", "大鱼", "大鱼人"', "29": '"潮汐猎人", "潮汐", "西瓜皮"', "30": '"巫医"', "31": '"巫妖"', "32": '"力丸", "隐形刺客", "隐刺"', "33": '"谜团"', "34": '"修补匠", "TK", "Tinker"', "35": '"狙击手", "矮人火枪手", "火枪", "传说哥"', "36": '"瘟疫法师", "死灵法", "NEC"', "37": '"术士", "Warlock"', "38": '"兽王"', "39": '"痛苦女王", "女王", "QOP"', "40": '"剧毒术士", "剧毒"', "41": '"虚空假面", "虚空", "JB脸"', "42": '"冥魂大帝", "骷髅王"', "43": '"死亡先知", "DP"', "44": '"幻影刺客", "幻刺", "PA"', "45": '"帕格纳", "骨法", "湮灭法师"', "46": '"圣堂刺客", "圣堂", "TA"', "47": '"冥界亚龙", "毒龙", "Viper"', "48": '"露娜", "月骑", "Luna"', "49": '"龙骑士", "龙骑"', "50": '"戴泽", "暗影牧师", "暗牧"', "51": '"发条技师", "发条"', "52": '"拉席克", "老鹿"', "53": '"先知"', "54": '"噬魂鬼", "小狗"', "55": '"黑暗贤者", "黑贤"', "56": '"克林克兹", "小骷髅"', "57": '"全能骑士", "全能"', "58": '"魅惑魔女", "小鹿"', "59": '"哈斯卡", "神灵", "神灵武士"', "60": '"暗夜魔王", "夜魔"', "61": '"育母蜘蛛", "蜘蛛"', "62": '"赏金猎人", "赏金"', "63": '"编织者", "蚂蚁"', "64": '"杰奇洛", "双头龙"', "65": '"蝙蝠骑士", "蝙蝠"', "66": '"陈", "老陈"', "67": '"幽鬼", "SPE", "UG"', "68": '"远古冰魄", "冰魂"', "69": '"末日使者", "末日", "Doom"', "70": '"熊战士", "拍拍", "拍拍熊"', "71": '"裂魂人", "白牛", "sb"', "72": '"矮人直升机", "飞机"', "73": '"炼金术士", "炼金"', "74": '"祈求者", "卡尔"', "75": '"沉默术士", "沉默"', "76": '"殁境神蚀者", "黑鸟"', "77": '"狼人"', "78": '"酒仙", "熊猫", "熊猫酒仙"', "79": '"暗影恶魔", "毒狗"', "80": '"德鲁伊", "熊德"', "81": '"混沌骑士", "混沌", "CK"', "82": '"米波"', "83": '"树精卫士", "大树", "树精"', "84": '"食人魔魔法师", "蓝胖"', "85": '"不朽尸王", "尸王"', "86": '"拉比克"', "87": '"干扰者", "萨尔"', "88": '"司夜刺客", "小强"', "89": '"娜迦海妖", "小娜迦"', "90": '"光之守卫", "光法"', "91": '"艾欧", "小精灵", "精灵", "IO"', "92": '"维萨吉", "死灵龙", "死灵飞龙"', "93": '"斯拉克", "小鱼", "小鱼人"', "94": '"美杜莎", "一姐", "美杜莎"', "95": '"巨魔战将", "巨魔", "巨馍蘸酱"', "96": '"半人马战行者", "人马", "半人马"', "97": '"马格纳斯", "猛犸"', "98": '"伐木机", "花母鸡"', "99": '"钢背兽", "钢背"', "100": '"巨牙海民", "海民"', "101": '"天怒法师", "天怒"', "102": '"亚巴顿"', "103": '"上古巨神", "大牛"', "104": '"军团指挥官", "军团"', "105": '"工程师", "炸弹", "炸弹人"', "106": '"灰烬之灵", "火猫"', "107": '"大地之灵", "土猫"', "108": '"孽主", "大屁股"', "109": '"恐怖利刃", "TB"', "110": '"凤凰", "烧鸡"', "111": '"神谕者", "神谕"', "112": '"寒冬飞龙", "冰龙"', "113": '"天穹守望者", "电狗"', "114": '"齐天大圣", "大圣"', "119": '"邪影芳灵", "小仙女", "花仙子"', "120": '"石鳞剑士", "滚滚"', "121": '"天涯墨客", "墨客"', "123": '"森海飞霞", "松鼠", "小松鼠", "小松许"', "126": '"虚无之灵", "紫猫"', "128": '"电炎绝手", "老奶奶"', "129": '"玛尔斯"', "131": '"百戏大王"', "135": '"破晓辰星", "大锤"', "136": '"玛西"', "137": '"獸", "畜"', "138": '"琼英碧灵", "奶绿", "绿奶奶"', "145": '"凯", "鸟人"' }, broadcast: { WIN_NEGATIVE: '"侥幸赢得了比赛", "走狗屎运赢得了比赛", "躺赢了比赛", "打团都没来, 队友4V5赢得了比赛"', WIN_POSITIVE: '"带领团队走向了胜利", "暴打对面后赢得了胜利", " CARRY全场赢得了胜利", "把对面当猪宰了, 赢得了胜利", "又赢了, 这游戏就是这么枯燥, 且乏味", "直接进行一个比赛的赢"', LOSE_NEGATIVE: '"被人按在地上摩擦, 输掉了这场比赛", "悲惨地输掉了比赛", "头都被打歪了, 心态爆炸地输掉了比赛", "捕鱼被鱼吃了, 输掉了比赛", "打的是个几把", "直接进行一个比赛的输"', LOSE_POSITIVE: '"无力回天输掉了比赛", "尽力了, 但还是输了比赛", "背靠世界树, 虽败犹荣", "带不动队友, 输了比赛", "又输了, 很难受, 宁愿输的是我"', message: "{name}的{hero_name}{comment}。\nKDA:{kda},GPM/XPM:{gpm_xpm},补刀/反补:{lh_dn},伤害/塔伤:{damage},参战/参葬率:{kc_dc}" }, logger: { fetch_guilds_failed: "
|
|
620
|
+
module2.exports = { dota2tracker: { heroes_nicknames: { "0": '请严格遵循 "", "" 格式填写(如下方默认数据,注意是英文半角符号),如果格式有误将仅使用英雄默认名称。可以不包含英雄默认名称。', "1": '"敌法师", "敌法", "AM"', "2": '"斧王"', "3": '"祸乱之源", "祸乱", "水桶腰"', "4": '"血魔"', "5": '"水晶室女", "冰女", "CM"', "6": '"卓尔游侠", "小黑"', "7": '"撼地者", "小牛", "牛头"', "8": '"主宰", "剑圣", "jugg", "奶棒人"', "9": '"米拉娜", "白虎", "pom"', "10": '"变体精灵", "水人"', "11": '"影魔", "影魔王", "SF", "影儿魔儿"', "12": '"幻影长矛手", "PL"', "13": '"帕克"', "14": '"帕吉", "屠夫", "扒鸡", "啪唧"', "15": '"雷泽", "电魂", "电棍"', "16": '"沙王", "SK"', "17": '"风暴之灵", "蓝猫"', "18": '"斯温", "流浪剑客", "流浪"', "19": '"小小"', "20": '"复仇之魂", "复仇", "VS"', "21": '"风行者", "风行", "WR"', "22": '"宙斯"', "23": '"昆卡", "船长"', "25": '"莉娜", "火女"', "26": '"莱恩", "恶魔巫师", "Lion"', "27": '"暗影萨满", "小Y", "小歪"', "28": '"斯拉达", "大鱼", "大鱼人"', "29": '"潮汐猎人", "潮汐", "西瓜皮"', "30": '"巫医"', "31": '"巫妖"', "32": '"力丸", "隐形刺客", "隐刺"', "33": '"谜团"', "34": '"修补匠", "TK", "Tinker"', "35": '"狙击手", "矮人火枪手", "火枪", "传说哥"', "36": '"瘟疫法师", "死灵法", "NEC"', "37": '"术士", "Warlock"', "38": '"兽王"', "39": '"痛苦女王", "女王", "QOP"', "40": '"剧毒术士", "剧毒"', "41": '"虚空假面", "虚空", "JB脸"', "42": '"冥魂大帝", "骷髅王"', "43": '"死亡先知", "DP"', "44": '"幻影刺客", "幻刺", "PA"', "45": '"帕格纳", "骨法", "湮灭法师"', "46": '"圣堂刺客", "圣堂", "TA"', "47": '"冥界亚龙", "毒龙", "Viper"', "48": '"露娜", "月骑", "Luna"', "49": '"龙骑士", "龙骑"', "50": '"戴泽", "暗影牧师", "暗牧"', "51": '"发条技师", "发条"', "52": '"拉席克", "老鹿"', "53": '"先知"', "54": '"噬魂鬼", "小狗"', "55": '"黑暗贤者", "黑贤"', "56": '"克林克兹", "小骷髅"', "57": '"全能骑士", "全能"', "58": '"魅惑魔女", "小鹿"', "59": '"哈斯卡", "神灵", "神灵武士"', "60": '"暗夜魔王", "夜魔"', "61": '"育母蜘蛛", "蜘蛛"', "62": '"赏金猎人", "赏金"', "63": '"编织者", "蚂蚁"', "64": '"杰奇洛", "双头龙"', "65": '"蝙蝠骑士", "蝙蝠"', "66": '"陈", "老陈"', "67": '"幽鬼", "SPE", "UG"', "68": '"远古冰魄", "冰魂"', "69": '"末日使者", "末日", "Doom"', "70": '"熊战士", "拍拍", "拍拍熊"', "71": '"裂魂人", "白牛", "sb"', "72": '"矮人直升机", "飞机"', "73": '"炼金术士", "炼金"', "74": '"祈求者", "卡尔"', "75": '"沉默术士", "沉默"', "76": '"殁境神蚀者", "黑鸟"', "77": '"狼人"', "78": '"酒仙", "熊猫", "熊猫酒仙"', "79": '"暗影恶魔", "毒狗"', "80": '"德鲁伊", "熊德"', "81": '"混沌骑士", "混沌", "CK"', "82": '"米波"', "83": '"树精卫士", "大树", "树精"', "84": '"食人魔魔法师", "蓝胖"', "85": '"不朽尸王", "尸王"', "86": '"拉比克"', "87": '"干扰者", "萨尔"', "88": '"司夜刺客", "小强"', "89": '"娜迦海妖", "小娜迦"', "90": '"光之守卫", "光法"', "91": '"艾欧", "小精灵", "精灵", "IO"', "92": '"维萨吉", "死灵龙", "死灵飞龙"', "93": '"斯拉克", "小鱼", "小鱼人"', "94": '"美杜莎", "一姐", "美杜莎"', "95": '"巨魔战将", "巨魔", "巨馍蘸酱"', "96": '"半人马战行者", "人马", "半人马"', "97": '"马格纳斯", "猛犸"', "98": '"伐木机", "花母鸡"', "99": '"钢背兽", "钢背"', "100": '"巨牙海民", "海民"', "101": '"天怒法师", "天怒"', "102": '"亚巴顿"', "103": '"上古巨神", "大牛"', "104": '"军团指挥官", "军团"', "105": '"工程师", "炸弹", "炸弹人"', "106": '"灰烬之灵", "火猫"', "107": '"大地之灵", "土猫"', "108": '"孽主", "大屁股"', "109": '"恐怖利刃", "TB"', "110": '"凤凰", "烧鸡"', "111": '"神谕者", "神谕"', "112": '"寒冬飞龙", "冰龙"', "113": '"天穹守望者", "电狗"', "114": '"齐天大圣", "大圣"', "119": '"邪影芳灵", "小仙女", "花仙子"', "120": '"石鳞剑士", "滚滚"', "121": '"天涯墨客", "墨客"', "123": '"森海飞霞", "松鼠", "小松鼠", "小松许"', "126": '"虚无之灵", "紫猫"', "128": '"电炎绝手", "老奶奶"', "129": '"玛尔斯"', "131": '"百戏大王"', "135": '"破晓辰星", "大锤"', "136": '"玛西"', "137": '"獸", "畜"', "138": '"琼英碧灵", "奶绿", "绿奶奶"', "145": '"凯", "鸟人"' }, broadcast: { WIN_NEGATIVE: '"侥幸赢得了比赛", "走狗屎运赢得了比赛", "躺赢了比赛", "打团都没来, 队友4V5赢得了比赛"', WIN_POSITIVE: '"带领团队走向了胜利", "暴打对面后赢得了胜利", " CARRY全场赢得了胜利", "把对面当猪宰了, 赢得了胜利", "又赢了, 这游戏就是这么枯燥, 且乏味", "直接进行一个比赛的赢"', LOSE_NEGATIVE: '"被人按在地上摩擦, 输掉了这场比赛", "悲惨地输掉了比赛", "头都被打歪了, 心态爆炸地输掉了比赛", "捕鱼被鱼吃了, 输掉了比赛", "打的是个几把", "直接进行一个比赛的输"', LOSE_POSITIVE: '"无力回天输掉了比赛", "尽力了, 但还是输了比赛", "背靠世界树, 虽败犹荣", "带不动队友, 输了比赛", "又输了, 很难受, 宁愿输的是我"', message: "{name}的{hero_name}{comment}。\nKDA:{kda},GPM/XPM:{gpm_xpm},补刀/反补:{lh_dn},伤害/塔伤:{damage},参战/参葬率:{kc_dc}", rank_changed: "群友 {name} 段位变动:{prev.medal}{prev.star} → {curr.medal}{curr.star}" }, logger: { fetch_guilds_failed: "获取群组信息失败,将继续后续步骤。", match_tracked: "追踪到来自{#each messageToLogger as item}群组 {item.platform}:{item.guildId} 的用户[{#each item.players as player}{player.nickName}({player.steamId}){#if player === item.players[item.players.length - 1]}{/if}{#if player !== item.players[item.players.length - 1]}、{/if}{/each}]{#if item !== messageToLogger[messageToLogger.length - 1]}、{/if}{/each}的尚未播报过的最新比赛 {match.id}。", parse_request_sent: "比赛 {matchId} 解析请求已成功发送至STRATZ服务器。", parse_request_failed: "比赛 {matchId} 解析请求发送失败。", match_parsed: "比赛 {matchId} 已解析,生成图片并发布于{#each guilds as guild}{guild.platform}:{guild.guildId}{#if guild !== guilds[guilds.length - 1]}、{/if}{/each}。", match_unparsed: "比赛 {matchId} 超过等待时间[{timeout}]仍未解析,生成图片并发布于{#each guilds as guild}{guild.platform}:{guild.guildId}{#if guild !== guilds[guilds.length - 1]}、{/if}{/each}。", waiting_for_parse: "比赛 {matchId} 尚未解析完成,继续等待。", report_sent: "发布{title}于{platform}:{guildId}。", rank_sent: "向{platform}:{guildId}发布{player.nickName}({player.steamId})的段位变动信息。", ejs_error: "EJS模板渲染错误:{error}" } } };
|
|
621
621
|
}
|
|
622
622
|
});
|
|
623
623
|
|
|
@@ -1132,7 +1132,7 @@ function getFormattedPlayerData(param) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
return a.heroId - b.heroId;
|
|
1134
1134
|
});
|
|
1135
|
-
player.heroesPerformanceTop10 = playerExtra?.heroesPerformance.slice(0, 10);
|
|
1135
|
+
player.heroesPerformanceTop10 = playerExtra?.heroesPerformance.slice(0, 10) ?? [];
|
|
1136
1136
|
if (genHero) {
|
|
1137
1137
|
const { matchCount, winCount, imp } = player.heroesPerformanceTop10[0];
|
|
1138
1138
|
player.matchCount = matchCount;
|
|
@@ -1386,12 +1386,17 @@ var name = "dota2tracker";
|
|
|
1386
1386
|
var usage = "";
|
|
1387
1387
|
var inject = ["http", "database", "cron", "puppeteer", "cache"];
|
|
1388
1388
|
var pluginDir2 = import_path2.default.resolve(__dirname, "..");
|
|
1389
|
+
var GraphqlLanguageEnum = /* @__PURE__ */ ((GraphqlLanguageEnum2) => {
|
|
1390
|
+
GraphqlLanguageEnum2["en-US"] = "ENGLISH";
|
|
1391
|
+
GraphqlLanguageEnum2["zh-CN"] = "S_CHINESE";
|
|
1392
|
+
return GraphqlLanguageEnum2;
|
|
1393
|
+
})(GraphqlLanguageEnum || {});
|
|
1389
1394
|
var Config = import_koishi2.Schema.intersect([
|
|
1390
1395
|
import_koishi2.Schema.object({
|
|
1391
1396
|
STRATZ_API_TOKEN: import_koishi2.Schema.string().required().role("secret"),
|
|
1392
1397
|
dataParsingTimeoutMinutes: import_koishi2.Schema.number().default(60).min(0).max(1440),
|
|
1393
1398
|
urlInMessageType: import_koishi2.Schema.array(import_koishi2.Schema.union([import_koishi2.Schema.const("match"), import_koishi2.Schema.const("player"), import_koishi2.Schema.const("hero")])).role("checkbox")
|
|
1394
|
-
}).i18n(
|
|
1399
|
+
}).i18n(Object.keys(GraphqlLanguageEnum).reduce((acc, cur) => (acc[cur] = globRequire_locales_schema_yml(`./locales/${cur}.schema.yml`)._config.base, acc), {})),
|
|
1395
1400
|
import_koishi2.Schema.intersect([
|
|
1396
1401
|
import_koishi2.Schema.object({
|
|
1397
1402
|
rankBroadSwitch: import_koishi2.Schema.boolean().default(false)
|
|
@@ -1405,7 +1410,7 @@ var Config = import_koishi2.Schema.intersect([
|
|
|
1405
1410
|
}),
|
|
1406
1411
|
import_koishi2.Schema.object({})
|
|
1407
1412
|
])
|
|
1408
|
-
]).i18n(
|
|
1413
|
+
]).i18n(Object.keys(GraphqlLanguageEnum).reduce((acc, cur) => (acc[cur] = globRequire_locales_schema_yml(`./locales/${cur}.schema.yml`)._config.rank, acc), {})),
|
|
1409
1414
|
import_koishi2.Schema.intersect([
|
|
1410
1415
|
import_koishi2.Schema.object({
|
|
1411
1416
|
dailyReportSwitch: import_koishi2.Schema.boolean().default(false)
|
|
@@ -1429,22 +1434,17 @@ var Config = import_koishi2.Schema.intersect([
|
|
|
1429
1434
|
}),
|
|
1430
1435
|
import_koishi2.Schema.object({})
|
|
1431
1436
|
])
|
|
1432
|
-
]).i18n(
|
|
1437
|
+
]).i18n(Object.keys(GraphqlLanguageEnum).reduce((acc, cur) => (acc[cur] = globRequire_locales_schema_yml(`./locales/${cur}.schema.yml`)._config.report, acc), {})),
|
|
1433
1438
|
import_koishi2.Schema.object({
|
|
1434
1439
|
template_match: import_koishi2.Schema.union([...readDirectoryFilesSync(import_path2.default.join(pluginDir2, "template", "match"))]).default("match_1"),
|
|
1435
1440
|
template_player: import_koishi2.Schema.union([...readDirectoryFilesSync(import_path2.default.join(pluginDir2, "template", "player"))]).default("player_1"),
|
|
1436
1441
|
template_hero: import_koishi2.Schema.union([...readDirectoryFilesSync(import_path2.default.join(pluginDir2, "template", "hero"))]).default("hero_1"),
|
|
1437
1442
|
playerRankEstimate: import_koishi2.Schema.boolean().default(true)
|
|
1438
|
-
}).i18n(
|
|
1443
|
+
}).i18n(Object.keys(GraphqlLanguageEnum).reduce((acc, cur) => (acc[cur] = globRequire_locales_schema_yml(`./locales/${cur}.schema.yml`)._config.template, acc), {}))
|
|
1439
1444
|
]);
|
|
1440
1445
|
var pendingMatches = [];
|
|
1441
1446
|
var random = new import_koishi3.Random(() => Math.random());
|
|
1442
1447
|
var days_30 = 2592e6;
|
|
1443
|
-
var GraphqlLanguageEnum = /* @__PURE__ */ ((GraphqlLanguageEnum2) => {
|
|
1444
|
-
GraphqlLanguageEnum2["en-US"] = "ENGLISH";
|
|
1445
|
-
GraphqlLanguageEnum2["zh-CN"] = "S_CHINESE";
|
|
1446
|
-
return GraphqlLanguageEnum2;
|
|
1447
|
-
})(GraphqlLanguageEnum || {});
|
|
1448
1448
|
var constantLocales = {};
|
|
1449
1449
|
async function apply(ctx, config) {
|
|
1450
1450
|
init(ctx.http, ctx.setTimeout, config.STRATZ_API_TOKEN);
|
|
@@ -1488,7 +1488,7 @@ async function apply(ctx, config) {
|
|
|
1488
1488
|
guildId: session.event.channel.id,
|
|
1489
1489
|
platform: session.event.platform
|
|
1490
1490
|
});
|
|
1491
|
-
session.send(session.text(".
|
|
1491
|
+
session.send(session.text(".unsubscribe_success"));
|
|
1492
1492
|
return;
|
|
1493
1493
|
}
|
|
1494
1494
|
} else session.send(session.text(".not_subscribed"));
|
|
@@ -2019,7 +2019,11 @@ async function apply(ctx, config) {
|
|
|
2019
2019
|
);
|
|
2020
2020
|
await ctx.broadcast([`${subPlayer.platform}:${subPlayer.guildId}`], img);
|
|
2021
2021
|
} else {
|
|
2022
|
-
const message =
|
|
2022
|
+
const message = $t(languageTag, "dota2tracker.broadcast.rank_changed", {
|
|
2023
|
+
name: name2,
|
|
2024
|
+
prev: { medal: $t(languageTag, "dota2tracker.template.ranks." + prevRank.medal), star: prevRank.star },
|
|
2025
|
+
curr: { medal: $t(languageTag, "dota2tracker.template.ranks." + currRank.medal), star: currRank.star }
|
|
2026
|
+
});
|
|
2023
2027
|
const img = await ctx.puppeteer.render(await genImageHTML(currRank, "rank" + (config.rankBroadFun ? "2" : ""), "rank" /* Rank */, ctx, languageTag));
|
|
2024
2028
|
await ctx.broadcast([`${subPlayer.platform}:${subPlayer.guildId}`], message + img);
|
|
2025
2029
|
}
|
|
@@ -2169,7 +2173,7 @@ async function apply(ctx, config) {
|
|
|
2169
2173
|
return constantTranslation;
|
|
2170
2174
|
}
|
|
2171
2175
|
const originalKey = Array.isArray(key) ? key : [key];
|
|
2172
|
-
const result = ctx.i18n.render([languageTag], originalKey, param ?? {}).map((element) => element?.attrs?.content).join("") ?? "";
|
|
2176
|
+
const result = ctx.i18n.render([languageTag], originalKey, param ?? {}).map((element) => element.type == "br" ? "<br/>" : element?.attrs?.content).join("") ?? "";
|
|
2173
2177
|
if (result == key) return;
|
|
2174
2178
|
return result;
|
|
2175
2179
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjtdev/koishi-plugin-dota2tracker",
|
|
3
3
|
"description": "koishi插件-追踪群友的DOTA2对局",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -32,10 +32,9 @@
|
|
|
32
32
|
"moment": "^2.30.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"koishi": "^4.18.
|
|
35
|
+
"koishi": "^4.18.7"
|
|
36
36
|
},
|
|
37
37
|
"koishi": {
|
|
38
|
-
"preview": "true",
|
|
39
38
|
"description": {
|
|
40
39
|
"zh": "追踪群友的DOTA2对局"
|
|
41
40
|
},
|
package/readme.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# [@sjtdev/koishi-plugin-dota2tracker](https://sjtdev.github.io/koishi-plugin-dota2tracker/)
|
|
2
|
-
|
|
3
|
-
[新文档](https://sjtdev.github.io/koishi-plugin-dota2tracker/)正在缓慢构建中……
|
|
2
|
+
↑ 文档已构建完毕,点击上方移步到文档页面阅读。
|
|
4
3
|
|
|
5
4
|
[](https://www.npmjs.com/package/@sjtdev/koishi-plugin-dota2tracker)
|
|
6
5
|
[](https://www.npmjs.com/package/@sjtdev/koishi-plugin-dota2tracker)
|
|
7
6
|
[](https://www.npmjs.com/package/@sjtdev/koishi-plugin-dota2tracker)
|
|
8
7
|
> [!TIP]
|
|
9
|
-
>
|
|
8
|
+
> 两个标签取版本号最高为最新版本
|
|
10
9
|
|
|
11
10
|
DOTA2Bot插件-提供自动追踪群友的最新对局的功能(需群友绑定),以及一系列查询功能。
|
|
12
11
|
### 安装
|
package/template/hero/hero_1.ejs
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
background-color: black;
|
|
12
12
|
color: white;
|
|
13
13
|
width: 800px;
|
|
14
|
+
font-family: 'MiSans', sans-serif;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
.wrapper > *:not(.skills) {
|
|
@@ -818,13 +819,13 @@
|
|
|
818
819
|
<div class="attributes">
|
|
819
820
|
${item.special_values
|
|
820
821
|
.filter(sv => sv.heading_loc)
|
|
821
|
-
.map((sv) =>
|
|
822
|
+
.map((sv) =>
|
|
822
823
|
`<p>
|
|
823
824
|
<span class="heading">${sv.heading_loc}</span>
|
|
824
825
|
<span class="values">
|
|
825
826
|
${!(sv.values_float.every(value => value === 0) || sv.values_float.length == 0) ?
|
|
826
827
|
`<span class="primary${(sv.values_float.every(value => value === 0) || sv.values_float.length == 0)?" empty":""}">
|
|
827
|
-
${(!((sv.values_float.every(value => value === 0) || sv.values_float.length == 0) && (sv.values_scepter.length || sv.values_shard.length || sv.facet_bonus.name))
|
|
828
|
+
${(!((sv.values_float.every(value => value === 0) || sv.values_float.length == 0) && (sv.values_scepter.length || sv.values_shard.length || sv.facet_bonus.name))
|
|
828
829
|
? (sv.values_float.map(value => value + (sv.is_percentage ? "%" : "")).join(" / ")) : "")}
|
|
829
830
|
</span>` : "" }
|
|
830
831
|
${sv.values_scepter && sv.values_scepter.length ?
|
|
@@ -839,7 +840,7 @@
|
|
|
839
840
|
`<span class="alternative facet">
|
|
840
841
|
<span class="facet"><span class="name_back type_${hero.facets.find(facet=>facet.name==sv.facet_bonus.name).color}"><img src="${utils.getImageUrl(hero.facets.find(facet=>facet.name==sv.facet_bonus.name).icon, ImageType.IconsFacets)}" />${sv.facet_bonus.values.map(value => value + (sv.is_percentage ? "%" : "")).join(" / ")}</span></span>
|
|
841
842
|
</span>` : "" }
|
|
842
|
-
${sv.bonuses.length ?
|
|
843
|
+
${sv.bonuses.length ?
|
|
843
844
|
`<span class="alternative talent">
|
|
844
845
|
${sv.bonuses.map(bonus=>` <img src="${utils.getImageUrl("talents","icons","svg")}"/>${(bonus.value>0?'<span class="plus">+</span>':"")+bonus.value+(sv.is_percentage?"%":"")}`).join(" ")}
|
|
845
846
|
</span>` : "" }
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Document</title>
|
|
7
7
|
<style>
|
|
8
|
-
html
|
|
8
|
+
html {
|
|
9
|
+
width: 816px;
|
|
10
|
+
font-family: 'MiSans', sans-serif;
|
|
11
|
+
}
|
|
9
12
|
body {
|
|
10
13
|
background-color: black;
|
|
11
14
|
color: white;
|
|
@@ -810,7 +813,7 @@
|
|
|
810
813
|
<p class="time">${utils.sec2time(item.time)}</p>
|
|
811
814
|
</div>`
|
|
812
815
|
: `
|
|
813
|
-
<div class="item" style="visibility:hidden"
|
|
816
|
+
<div class="item" style="visibility:hidden">
|
|
814
817
|
<img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />
|
|
815
818
|
<p class="time">--:--</p>
|
|
816
819
|
</div>`
|
|
@@ -827,7 +830,7 @@
|
|
|
827
830
|
<p class="time">${utils.sec2time(item.time)}</p>
|
|
828
831
|
</div>`
|
|
829
832
|
: `
|
|
830
|
-
<div class="item back" style="visibility:hidden"
|
|
833
|
+
<div class="item back" style="visibility:hidden">
|
|
831
834
|
<img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />
|
|
832
835
|
<p class="time">--:--</p>
|
|
833
836
|
</div>`
|
|
@@ -883,7 +886,7 @@
|
|
|
883
886
|
<p class="time">${utils.sec2time(item.time)}</p>
|
|
884
887
|
</div>`
|
|
885
888
|
: `
|
|
886
|
-
<div class="item" style="visibility:hidden"
|
|
889
|
+
<div class="item" style="visibility:hidden">
|
|
887
890
|
<img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />>
|
|
888
891
|
<p class="time">--:--</p>
|
|
889
892
|
</div>`
|
|
@@ -898,7 +901,7 @@
|
|
|
898
901
|
<p class="time">${utils.sec2time(item.time)}</p>
|
|
899
902
|
</div>`
|
|
900
903
|
: `
|
|
901
|
-
<div class="item back" style="visibility:hidden"
|
|
904
|
+
<div class="item back" style="visibility:hidden">
|
|
902
905
|
<img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />
|
|
903
906
|
<p class="time">--:--</p>
|
|
904
907
|
</div>`
|
|
@@ -931,7 +934,7 @@
|
|
|
931
934
|
<p class="time">${utils.sec2time(item.time)}</p>
|
|
932
935
|
</div>`
|
|
933
936
|
: `
|
|
934
|
-
<div class="item" style="visibility:hidden"
|
|
937
|
+
<div class="item" style="visibility:hidden">
|
|
935
938
|
<img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />>
|
|
936
939
|
<p class="time">--:--</p>
|
|
937
940
|
</div>`
|
|
@@ -946,7 +949,7 @@
|
|
|
946
949
|
<p class="time">${utils.sec2time(item.time)}</p>
|
|
947
950
|
</div>`
|
|
948
951
|
: `
|
|
949
|
-
<div class="item back" style="visibility:hidden"
|
|
952
|
+
<div class="item back" style="visibility:hidden">
|
|
950
953
|
<img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />
|
|
951
954
|
<p class="time">--:--</p>
|
|
952
955
|
</div>`
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
html,
|
|
19
19
|
body {
|
|
20
|
+
overflow: hidden;
|
|
20
21
|
width: 800px;
|
|
22
|
+
font-family: 'MiSans', sans-serif;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
nav {
|
|
@@ -94,8 +96,7 @@
|
|
|
94
96
|
flex-direction: column;
|
|
95
97
|
}
|
|
96
98
|
|
|
97
|
-
.panel
|
|
98
|
-
.player {
|
|
99
|
+
.panel {
|
|
99
100
|
padding: 0 10px;
|
|
100
101
|
}
|
|
101
102
|
|
|
@@ -139,6 +140,7 @@
|
|
|
139
140
|
font-size: 12px;
|
|
140
141
|
line-height: 14px;
|
|
141
142
|
overflow: hidden;
|
|
143
|
+
justify-content: center;
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
.player > .row-1 {
|
|
@@ -305,7 +307,8 @@
|
|
|
305
307
|
|
|
306
308
|
.player > .titles {
|
|
307
309
|
grid-row: 4;
|
|
308
|
-
grid-column:
|
|
310
|
+
grid-column: 2/4;
|
|
311
|
+
margin-left: 4px;
|
|
309
312
|
/* text-shadow: 1px 1px 0 #333; 设置阴影颜色及偏移 */
|
|
310
313
|
}
|
|
311
314
|
.player > .titles > span {
|
|
@@ -561,7 +564,7 @@
|
|
|
561
564
|
<span class="rank">${`[${$t("dota2tracker.template.ranks."+player.rank.medal)}${player.rank.star||""}]`}</span>
|
|
562
565
|
<span class="name">${eh(player.steamAccount.name)}</span>
|
|
563
566
|
</div>
|
|
564
|
-
<p class="pick">${player.isRandom?$t("dota2tracker.template.random"):$t("dota2tracker.template.pick_order",
|
|
567
|
+
<p class="pick">${player.isRandom?$t("dota2tracker.template.random"):$t("dota2tracker.template.pick_order", [player.order == null ? "?" : player.order + 1])} ${$t("dota2tracker.template.position_"+player.position?.slice(-1))??''}</p>
|
|
565
568
|
<p class="networth">
|
|
566
569
|
<span class="gold">${utils.formatNumber(player.networth)}</span>
|
|
567
570
|
(${(player.heroDamage / player.networth)?.toFixed(2)})
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
background-color: black;
|
|
12
12
|
color: white;
|
|
13
13
|
width: 800px;
|
|
14
|
+
font-family: 'MiSans', sans-serif;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
.wrapper > * {
|
|
@@ -484,7 +485,7 @@
|
|
|
484
485
|
<span class="victory"><%-outcomeCounts.victory + outcomeCounts.stomp%>(<span class="stomp"><%-outcomeCounts.stomp%></span>)</span>-<span class="tie"><%-outcomeCounts.tie%></span>-<span class="fail"><%-outcomeCounts.fail + outcomeCounts.stomped%>(<span class="stomped"><%-outcomeCounts.stomped%></span>)</span>
|
|
485
486
|
</span>
|
|
486
487
|
<span><%-$t("dota2tracker.template.lane_advantage_rate_")%>
|
|
487
|
-
<span <%-`style="color:${utils.winRateColor((outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.tie / 2) / (outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.tie + outcomeCounts.fail + outcomeCounts.stomped))};"`%>><%-player.steamAccount.isAnonymous?"?":(((outcomeCounts.victory + outcomeCounts.stomp) / (outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.fail + outcomeCounts.stomped)) * 100).toFixed(2)%>%</span>
|
|
488
|
+
<span <%-`style="color:${utils.winRateColor((outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.tie / 2) / (outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.tie + outcomeCounts.fail + outcomeCounts.stomped))};"`%>><%-player.steamAccount.isAnonymous?"?":(((outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.tie / 2) / (outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.tie + outcomeCounts.fail + outcomeCounts.stomped)) * 100).toFixed(2)%>%</span>
|
|
488
489
|
</span>
|
|
489
490
|
</p>
|
|
490
491
|
</div>
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
html {
|
|
13
13
|
width: 1024px;
|
|
14
14
|
height: 768px;
|
|
15
|
+
font-family: 'MiSans', sans-serif;
|
|
15
16
|
}
|
|
16
17
|
body {
|
|
17
18
|
background: no-repeat center center / cover;
|
|
@@ -84,15 +85,21 @@
|
|
|
84
85
|
</head>
|
|
85
86
|
<% const {name, avatar, isRising, prevRank, currRank, date} = data; %>
|
|
86
87
|
<% const kind = isRising ? "xi" : "bei"; %>
|
|
88
|
+
<% const rankInfo = {
|
|
89
|
+
name,
|
|
90
|
+
avatar: `<img src="${avatar}" />`,
|
|
91
|
+
prev: `<span class="rank prev">${$t("dota2tracker.template.ranks."+prevRank.medal)}${prevRank.leader ?? prevRank.star}</span>`,
|
|
92
|
+
curr: `<span class="rank curr">${$t("dota2tracker.template.ranks."+currRank.medal)}${currRank.leader ?? currRank.star}</span>`,
|
|
93
|
+
} %>
|
|
87
94
|
<body class="<%= kind %>" <%- `style="background-image: url( ${utils.getImageUrl(kind, undefined, "jpg")} )"`%>>
|
|
88
95
|
<div class="wrapper">
|
|
89
|
-
<p class="
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
<p class="<%= kind %>">
|
|
97
|
+
<%- kind == "xi" ?
|
|
98
|
+
$t("dota2tracker.template.rank_fun_up_message", rankInfo) :
|
|
99
|
+
$t("dota2tracker.template.rank_fun_down_message", rankInfo)
|
|
100
|
+
%>
|
|
93
101
|
</p>
|
|
94
|
-
<p
|
|
95
|
-
<p class="bei">寄</p>
|
|
102
|
+
<p></p>
|
|
96
103
|
<div class="ranks">
|
|
97
104
|
<div class="rank prev">
|
|
98
105
|
<img src="<%= utils.getImageUrl('medal_' +(prevRank.inTop100 ?? prevRank.medal)) %>" alt="" />
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
color: white;
|
|
13
13
|
width: 600px;
|
|
14
14
|
font-size: 14px;
|
|
15
|
+
font-family: 'MiSans', sans-serif;
|
|
15
16
|
}
|
|
16
17
|
body > * {
|
|
17
18
|
width: 100%;
|
|
@@ -154,8 +155,8 @@
|
|
|
154
155
|
<% if (player.avgImp < 0) imp.sign = "-"; %>
|
|
155
156
|
<% if (imp.absValue > 25) { %>
|
|
156
157
|
<% imp.isOver = true; %>
|
|
157
|
-
<% if (player.avgImp > 0) imp.right = imp.absValue; %>
|
|
158
|
-
<% if (player.avgImp < 0) imp.left = imp.absValue; %>
|
|
158
|
+
<% if (player.avgImp > 0) imp.right = imp.absValue; %>
|
|
159
|
+
<% if (player.avgImp < 0) imp.left = imp.absValue; %>
|
|
159
160
|
<% } else imp.left = imp.right = imp.absValue; %>
|
|
160
161
|
<div class="score_bar<%= player.avgImp > 0 ? " pos" : " neg" %><%= Math.abs(player.avgImp) > 25 ? " over" : "" %>">
|
|
161
162
|
<div class="left" <%- `style="width: ${imp.left}px"` %>></div>
|
|
@@ -168,7 +169,7 @@
|
|
|
168
169
|
</div>
|
|
169
170
|
<% } %>
|
|
170
171
|
</div>
|
|
171
|
-
<div class="combinations"
|
|
172
|
+
<div class="combinations"<%- !showCombi ? ` style="display:none;"` : "" %>>
|
|
172
173
|
<span style="grid-column: 1/-1"><%- $t("dota2tracker.template.combined_win_loss_summary") %></span>
|
|
173
174
|
<% combinations.forEach((combi) => {%>
|
|
174
175
|
<div class="players">
|
package/queries/HeroInfo.graphql
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
query HeroInfo($heroId: Short!) {
|
|
2
|
-
constants {
|
|
3
|
-
hero(id: $heroId, language: S_CHINESE) {
|
|
4
|
-
id
|
|
5
|
-
name
|
|
6
|
-
shortName
|
|
7
|
-
aliases
|
|
8
|
-
roles {
|
|
9
|
-
roleId
|
|
10
|
-
level
|
|
11
|
-
}
|
|
12
|
-
language {
|
|
13
|
-
displayName
|
|
14
|
-
lore
|
|
15
|
-
hype
|
|
16
|
-
}
|
|
17
|
-
abilities {
|
|
18
|
-
ability(language: S_CHINESE) {
|
|
19
|
-
name
|
|
20
|
-
language {
|
|
21
|
-
displayName
|
|
22
|
-
description
|
|
23
|
-
attributes
|
|
24
|
-
lore
|
|
25
|
-
aghanimDescription
|
|
26
|
-
shardDescription
|
|
27
|
-
notes
|
|
28
|
-
}
|
|
29
|
-
stat {
|
|
30
|
-
type
|
|
31
|
-
behavior
|
|
32
|
-
unitTargetType
|
|
33
|
-
unitTargetTeam
|
|
34
|
-
unitTargetFlags
|
|
35
|
-
unitDamageType
|
|
36
|
-
cooldown
|
|
37
|
-
manaCost
|
|
38
|
-
spellImmunity
|
|
39
|
-
isOnCastbar
|
|
40
|
-
isGrantedByShard
|
|
41
|
-
isGrantedByScepter
|
|
42
|
-
hasShardUpgrade
|
|
43
|
-
hasScepterUpgrade
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
talents {
|
|
48
|
-
abilityId
|
|
49
|
-
slot
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
package/template/rank/rank.ejs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<% const rank = data; %>
|
|
2
|
-
<head>
|
|
3
|
-
<style>
|
|
4
|
-
html,
|
|
5
|
-
body {
|
|
6
|
-
width: 128px;
|
|
7
|
-
height: 128px;
|
|
8
|
-
margin: 0;
|
|
9
|
-
padding: 0;
|
|
10
|
-
background-color: #0000;
|
|
11
|
-
}
|
|
12
|
-
div {
|
|
13
|
-
width: 128px;
|
|
14
|
-
height: 128px;
|
|
15
|
-
position: relative;
|
|
16
|
-
}
|
|
17
|
-
div > * {
|
|
18
|
-
position: absolute;
|
|
19
|
-
width: 100%;
|
|
20
|
-
}
|
|
21
|
-
p {
|
|
22
|
-
margin: 0;
|
|
23
|
-
text-align: center;
|
|
24
|
-
color: #fff;
|
|
25
|
-
bottom: 8px;
|
|
26
|
-
font-size: 20px;
|
|
27
|
-
text-shadow: -2px -2px 0 rgba(0, 0, 0, 0.5), 2px -2px 0 rgba(0, 0, 0, 0.5), -2px 2px 0 rgba(0, 0, 0, 0.5), 2px 2px 0 rgba(0, 0, 0, 0.5); /* 描边效果 */
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
30
|
-
</head>
|
|
31
|
-
<div>
|
|
32
|
-
<img src="<%= utils.getImageUrl('medal_' + (rank.inTop100 ?? rank.medal)) %>" />
|
|
33
|
-
<img src="<%= utils.getImageUrl("star_" + rank.star) %>" />
|
|
34
|
-
<p><%= rank.leader %></p>
|
|
35
|
-
</div>
|