@sjtdev/koishi-plugin-dota2tracker 1.4.1 → 1.4.3
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 +29 -27
- package/package.json +3 -3
- package/readme.md +10 -2
- package/template/match/match_1.ejs +1 -1
- package/template/match/match_2.ejs +3 -3
- package/template/player/player_1.ejs +1 -1
- package/template/rank/rank_fun.ejs +12 -6
- package/template/report/daily.ejs +1 -1
- package/queries/AllAbilitiesChineseName.graphql +0 -14
- package/queries/CurrentGameversion.graphql +0 -8
- package/queries/HeroInfo.graphql +0 -53
- package/template/rank/rank.ejs +0 -36
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}!", titles: { MVP: "MVP-#FFA500", Soul: "Soul-#66CCFF", Rich: "R-#FFD700", Wise: "W-#8888FF", Controller: "C-#FF00FF", Nuker: "N-#CC0088", Breaker: "B-#DD0000", Ghost: "G-#CCCCCC", Assister: "A-#006400", Demolisher: "D-#FEDCBA", Healer: "H-#00FF00", Tank: "T-#84A1C7", Idle: "I-#DDDDDD" } } } };
|
|
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: "数据未公开", anonymous_player_2: "背景仅供展示目的,不属于{player}的数据。" } } };
|
|
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/>寄", titles: { MVP: "MVP-#FFA500", Soul: "魂-#66CCFF", Rich: "富-#FFD700", Wise: "睿-#8888FF", Controller: "控-#FF00FF", Nuker: "爆-#CC0088", Breaker: "破-#DD0000", Ghost: "鬼-#CCCCCC", Assister: "助-#006400", Demolisher: "拆-#FEDCBA", Healer: "奶-#00FF00", Tank: "耐-#84A1C7", Idle: "摸-#DDDDDD" } } } };
|
|
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
|
|
|
@@ -665,10 +665,8 @@ var pluginDir = import_path.default.join(__dirname, "..");
|
|
|
665
665
|
var CONFIGS = { STRATZ_API: { URL: "https://api.stratz.com/graphql", TOKEN: "" } };
|
|
666
666
|
var http = null;
|
|
667
667
|
var setTimeout;
|
|
668
|
-
function init(
|
|
669
|
-
http =
|
|
670
|
-
setTimeout = newSetTimeout;
|
|
671
|
-
CONFIGS.STRATZ_API.TOKEN = APIKEY;
|
|
668
|
+
function init(params) {
|
|
669
|
+
({ http, setTimeout, APIKEY: CONFIGS.STRATZ_API.TOKEN } = params);
|
|
672
670
|
}
|
|
673
671
|
__name(init, "init");
|
|
674
672
|
async function fetchData(query2) {
|
|
@@ -995,28 +993,28 @@ function getFormattedMatchData(matchQuery, constantsQuery) {
|
|
|
995
993
|
"mvpScore",
|
|
996
994
|
void 0,
|
|
997
995
|
match.players.filter((player) => match.didRadiantWin == player.isRadiant)
|
|
998
|
-
)?.titles.push(
|
|
996
|
+
)?.titles.push("dota2tracker.template.titles.MVP");
|
|
999
997
|
findMaxByProperty(
|
|
1000
998
|
"mvpScore",
|
|
1001
999
|
void 0,
|
|
1002
1000
|
match.players.filter((player) => match.didRadiantWin != player.isRadiant)
|
|
1003
|
-
)?.titles.push(
|
|
1004
|
-
findMaxByProperty("networth")?.titles.push(
|
|
1005
|
-
findMaxByProperty("experiencePerMinute")?.titles.push(
|
|
1001
|
+
)?.titles.push("dota2tracker.template.titles.Soul");
|
|
1002
|
+
findMaxByProperty("networth")?.titles.push("dota2tracker.template.titles.Rich");
|
|
1003
|
+
findMaxByProperty("experiencePerMinute")?.titles.push("dota2tracker.template.titles.Wise");
|
|
1006
1004
|
if (match.parsedDateTime && match.players.every((player) => player?.stats?.heroDamageReport?.dealtTotal)) {
|
|
1007
1005
|
match.players.reduce(
|
|
1008
1006
|
(max, player) => player.stats.heroDamageReport.dealtTotal.stunDuration + player.stats.heroDamageReport.dealtTotal.disableDuration / 2 + player.stats.heroDamageReport.dealtTotal.slowDuration / 4 > max.stats.heroDamageReport.dealtTotal.stunDuration + max.stats.heroDamageReport.dealtTotal.disableDuration / 2 + max.stats.heroDamageReport.dealtTotal.slowDuration / 4 ? player : max
|
|
1009
|
-
).titles.push(
|
|
1007
|
+
).titles.push("dota2tracker.template.titles.Controller");
|
|
1010
1008
|
match.players.reduce(
|
|
1011
1009
|
(max, player) => player.stats.heroDamageReport.receivedTotal.physicalDamage + player.stats.heroDamageReport.receivedTotal.magicalDamage + player.stats.heroDamageReport.receivedTotal.pureDamage > max.stats.heroDamageReport.receivedTotal.physicalDamage + max.stats.heroDamageReport.receivedTotal.magicalDamage + max.stats.heroDamageReport.receivedTotal.pureDamage ? player : max
|
|
1012
|
-
).titles.push(
|
|
1010
|
+
).titles.push("dota2tracker.template.titles.Tank");
|
|
1013
1011
|
}
|
|
1014
|
-
findMaxByProperty("heroDamage")?.titles.push(
|
|
1015
|
-
findMaxByProperty("kills", "heroDamage")?.titles.push(
|
|
1016
|
-
findMaxByProperty("deaths", "networth", void 0, void 0, "min" /* Min */)?.titles.push(
|
|
1017
|
-
findMaxByProperty("assists", "heroDamage")?.titles.push(
|
|
1018
|
-
findMaxByProperty("towerDamage", "heroDamage")?.titles.push(
|
|
1019
|
-
findMaxByProperty("heroHealing")?.titles.push(
|
|
1012
|
+
findMaxByProperty("heroDamage")?.titles.push("dota2tracker.template.titles.Nuker");
|
|
1013
|
+
findMaxByProperty("kills", "heroDamage")?.titles.push("dota2tracker.template.titles.Breaker");
|
|
1014
|
+
findMaxByProperty("deaths", "networth", void 0, void 0, "min" /* Min */)?.titles.push("dota2tracker.template.titles.Ghost");
|
|
1015
|
+
findMaxByProperty("assists", "heroDamage")?.titles.push("dota2tracker.template.titles.Assister");
|
|
1016
|
+
findMaxByProperty("towerDamage", "heroDamage")?.titles.push("dota2tracker.template.titles.Demolisher");
|
|
1017
|
+
findMaxByProperty("heroHealing")?.titles.push("dota2tracker.template.titles.Healer");
|
|
1020
1018
|
match.players.reduce((lowest, player) => {
|
|
1021
1019
|
const currentContribution = (player.kills + player.assists) / match[player.team].killsCount;
|
|
1022
1020
|
const lowestContribution = (lowest.kills + lowest.assists) / match[lowest.team].killsCount;
|
|
@@ -1032,7 +1030,7 @@ function getFormattedMatchData(matchQuery, constantsQuery) {
|
|
|
1032
1030
|
}
|
|
1033
1031
|
}
|
|
1034
1032
|
return lowest;
|
|
1035
|
-
}).titles.push(
|
|
1033
|
+
}).titles.push("dota2tracker.template.titles.Idle");
|
|
1036
1034
|
return match;
|
|
1037
1035
|
}
|
|
1038
1036
|
__name(getFormattedMatchData, "getFormattedMatchData");
|
|
@@ -1447,7 +1445,7 @@ var random = new import_koishi3.Random(() => Math.random());
|
|
|
1447
1445
|
var days_30 = 2592e6;
|
|
1448
1446
|
var constantLocales = {};
|
|
1449
1447
|
async function apply(ctx, config) {
|
|
1450
|
-
init(ctx.http, ctx.setTimeout, config.STRATZ_API_TOKEN);
|
|
1448
|
+
init({ http: ctx.http, setTimeout: ctx.setTimeout, APIKEY: config.STRATZ_API_TOKEN });
|
|
1451
1449
|
for (const supportLanguageTag of Object.keys(GraphqlLanguageEnum)) {
|
|
1452
1450
|
constantLocales[supportLanguageTag] = globRequire_locales_constants_json(`./locales/${supportLanguageTag}.constants.json`);
|
|
1453
1451
|
ctx.i18n.define(supportLanguageTag, globRequire_locales_yml(`./locales/${supportLanguageTag}.yml`));
|
|
@@ -1488,7 +1486,7 @@ async function apply(ctx, config) {
|
|
|
1488
1486
|
guildId: session.event.channel.id,
|
|
1489
1487
|
platform: session.event.platform
|
|
1490
1488
|
});
|
|
1491
|
-
session.send(session.text(".
|
|
1489
|
+
session.send(session.text(".unsubscribe_success"));
|
|
1492
1490
|
return;
|
|
1493
1491
|
}
|
|
1494
1492
|
} else session.send(session.text(".not_subscribed"));
|
|
@@ -1826,7 +1824,7 @@ async function apply(ctx, config) {
|
|
|
1826
1824
|
if (input_data) {
|
|
1827
1825
|
let heroId = findingHero(input_data);
|
|
1828
1826
|
if (!heroId) {
|
|
1829
|
-
session.send(session.text(".
|
|
1827
|
+
session.send(session.text(".not_found"));
|
|
1830
1828
|
return;
|
|
1831
1829
|
}
|
|
1832
1830
|
await session.send(session.text(".querying_hero"));
|
|
@@ -2019,7 +2017,11 @@ async function apply(ctx, config) {
|
|
|
2019
2017
|
);
|
|
2020
2018
|
await ctx.broadcast([`${subPlayer.platform}:${subPlayer.guildId}`], img);
|
|
2021
2019
|
} else {
|
|
2022
|
-
const message =
|
|
2020
|
+
const message = $t(languageTag, "dota2tracker.broadcast.rank_changed", {
|
|
2021
|
+
name: name2,
|
|
2022
|
+
prev: { medal: $t(languageTag, "dota2tracker.template.ranks." + prevRank.medal), star: prevRank.star },
|
|
2023
|
+
curr: { medal: $t(languageTag, "dota2tracker.template.ranks." + currRank.medal), star: currRank.star }
|
|
2024
|
+
});
|
|
2023
2025
|
const img = await ctx.puppeteer.render(await genImageHTML(currRank, "rank" + (config.rankBroadFun ? "2" : ""), "rank" /* Rank */, ctx, languageTag));
|
|
2024
2026
|
await ctx.broadcast([`${subPlayer.platform}:${subPlayer.guildId}`], message + img);
|
|
2025
2027
|
}
|
|
@@ -2169,7 +2171,7 @@ async function apply(ctx, config) {
|
|
|
2169
2171
|
return constantTranslation;
|
|
2170
2172
|
}
|
|
2171
2173
|
const originalKey = Array.isArray(key) ? key : [key];
|
|
2172
|
-
const result = ctx.i18n.render([languageTag], originalKey, param ?? {}).map((element) => element?.attrs?.content).join("") ?? "";
|
|
2174
|
+
const result = ctx.i18n.render([languageTag], originalKey, param ?? {}).map((element) => element.type == "br" ? "<br/>" : element?.attrs?.content).join("") ?? "";
|
|
2173
2175
|
if (result == key) return;
|
|
2174
2176
|
return result;
|
|
2175
2177
|
}
|
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.3",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"koishi": "^4.18.7"
|
|
36
36
|
},
|
|
37
37
|
"koishi": {
|
|
38
|
-
"preview": "true",
|
|
39
38
|
"description": {
|
|
40
|
-
"zh": "追踪群友的DOTA2对局"
|
|
39
|
+
"zh": "追踪群友的DOTA2对局",
|
|
40
|
+
"en": "Track Friends' DOTA2 Matches"
|
|
41
41
|
},
|
|
42
42
|
"required": [
|
|
43
43
|
"http",
|
package/readme.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
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)
|
|
@@ -22,6 +21,15 @@ DOTA2Bot插件-提供自动追踪群友的最新对局的功能(需群友绑
|
|
|
22
21
|
|
|
23
22
|
**更新日志见[changelog](changelog.md)**
|
|
24
23
|
|
|
24
|
+
### 插件更新提示
|
|
25
|
+
**1.4.2**版本起,插件更新时会在Github发布一个无附件release,用于插件更新提醒。
|
|
26
|
+
如有需要可以使用 `Watch` 功能接收插件更新通知,以下为详细步骤:
|
|
27
|
+
1. 访问[仓库页面](https://github.com/sjtdev/koishi-plugin-dota2tracker)
|
|
28
|
+
2. 点击右上方的 "Watch" 按钮
|
|
29
|
+
3. 选择 "Custom" 选项
|
|
30
|
+
4. 在弹出的设置中勾选 "Releases" 选项
|
|
31
|
+
5. 点击 "Apply" 保存设置
|
|
32
|
+
|
|
25
33
|
### 指令
|
|
26
34
|
指令 <必填参数> [可选参数]
|
|
27
35
|
##### 订阅
|
|
@@ -799,7 +799,7 @@
|
|
|
799
799
|
</div>
|
|
800
800
|
</div>
|
|
801
801
|
<div class="titles">
|
|
802
|
-
${player.titles.map((item) => `<span style="color: ${
|
|
802
|
+
${player.titles.map((item) => {const [title, color] = $t(item).split("-"); return `<span style="color: ${color};">${title}</span>`}).join(" ")}
|
|
803
803
|
</div>
|
|
804
804
|
${player.hero.id != 80 ? `
|
|
805
805
|
<div class="items">
|
|
@@ -96,8 +96,7 @@
|
|
|
96
96
|
flex-direction: column;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.panel
|
|
100
|
-
.player {
|
|
99
|
+
.panel {
|
|
101
100
|
padding: 0 10px;
|
|
102
101
|
}
|
|
103
102
|
|
|
@@ -141,6 +140,7 @@
|
|
|
141
140
|
font-size: 12px;
|
|
142
141
|
line-height: 14px;
|
|
143
142
|
overflow: hidden;
|
|
143
|
+
justify-content: center;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
.player > .row-1 {
|
|
@@ -559,7 +559,7 @@
|
|
|
559
559
|
<img src="${utils.getImageUrl('star_' + player.rank.star)}" class="stars" />
|
|
560
560
|
<p>${player.steamAccount.seasonLeaderboardRank??""}</p>
|
|
561
561
|
</div>
|
|
562
|
-
<div class="titles">${player.titles.map((item) => `<span style="color: ${darkenHexColor(
|
|
562
|
+
<div class="titles">${player.titles.map((item) => {const [title, color] = $t(item).split("-"); return `<span style="color: ${darkenHexColor(color, 25)};">${title}</span>`}).join(" ")}</div>
|
|
563
563
|
<div class="player_name row-1">
|
|
564
564
|
<span class="rank">${`[${$t("dota2tracker.template.ranks."+player.rank.medal)}${player.rank.star||""}]`}</span>
|
|
565
565
|
<span class="name">${eh(player.steamAccount.name)}</span>
|
|
@@ -485,7 +485,7 @@
|
|
|
485
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>
|
|
486
486
|
</span>
|
|
487
487
|
<span><%-$t("dota2tracker.template.lane_advantage_rate_")%>
|
|
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.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>
|
|
489
489
|
</span>
|
|
490
490
|
</p>
|
|
491
491
|
</div>
|
|
@@ -85,15 +85,21 @@
|
|
|
85
85
|
</head>
|
|
86
86
|
<% const {name, avatar, isRising, prevRank, currRank, date} = data; %>
|
|
87
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
|
+
} %>
|
|
88
94
|
<body class="<%= kind %>" <%- `style="background-image: url( ${utils.getImageUrl(kind, undefined, "jpg")} )"`%>>
|
|
89
95
|
<div class="wrapper">
|
|
90
|
-
<p class="
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
+
%>
|
|
94
101
|
</p>
|
|
95
|
-
<p
|
|
96
|
-
<p class="bei">寄</p>
|
|
102
|
+
<p></p>
|
|
97
103
|
<div class="ranks">
|
|
98
104
|
<div class="rank prev">
|
|
99
105
|
<img src="<%= utils.getImageUrl('medal_' +(prevRank.inTop100 ?? prevRank.medal)) %>" alt="" />
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
</div>
|
|
170
170
|
<% } %>
|
|
171
171
|
</div>
|
|
172
|
-
<div class="combinations"
|
|
172
|
+
<div class="combinations"<%- !showCombi ? ` style="display:none;"` : "" %>>
|
|
173
173
|
<span style="grid-column: 1/-1"><%- $t("dota2tracker.template.combined_win_loss_summary") %></span>
|
|
174
174
|
<% combinations.forEach((combi) => {%>
|
|
175
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,36 +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
|
-
font-family: 'MiSans', sans-serif;
|
|
12
|
-
}
|
|
13
|
-
div {
|
|
14
|
-
width: 128px;
|
|
15
|
-
height: 128px;
|
|
16
|
-
position: relative;
|
|
17
|
-
}
|
|
18
|
-
div > * {
|
|
19
|
-
position: absolute;
|
|
20
|
-
width: 100%;
|
|
21
|
-
}
|
|
22
|
-
p {
|
|
23
|
-
margin: 0;
|
|
24
|
-
text-align: center;
|
|
25
|
-
color: #fff;
|
|
26
|
-
bottom: 8px;
|
|
27
|
-
font-size: 20px;
|
|
28
|
-
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); /* 描边效果 */
|
|
29
|
-
}
|
|
30
|
-
</style>
|
|
31
|
-
</head>
|
|
32
|
-
<div>
|
|
33
|
-
<img src="<%= utils.getImageUrl('medal_' + (rank.inTop100 ?? rank.medal)) %>" />
|
|
34
|
-
<img src="<%= utils.getImageUrl("star_" + rank.star) %>" />
|
|
35
|
-
<p><%= rank.leader %></p>
|
|
36
|
-
</div>
|