This commit is contained in:
Lanta 2023-10-11 12:49:19 +02:00
parent 11e98754c3
commit 7d6239855e

View file

@ -73,6 +73,8 @@ foreach ($winid in $new_win_matches) {
if ($null -eq $winid) { continue } if ($null -eq $winid) { continue }
$winmatches = $player_matches.player_matches | Where-Object { $_.id -eq $winid } $winmatches = $player_matches.player_matches | Where-Object { $_.id -eq $winid }
$telemetry = (invoke-webrequest @($winmatches.telemetry_url)[0]).content | convertfrom-json | where-object { ($_._T -eq 'LOGPLAYERTAKEDAMAGE') -or ($_._T -eq 'LOGPLAYERKILLV2') } $telemetry = (invoke-webrequest @($winmatches.telemetry_url)[0]).content | convertfrom-json | where-object { ($_._T -eq 'LOGPLAYERTAKEDAMAGE') -or ($_._T -eq 'LOGPLAYERKILLV2') }
$2D_replay_url = $winmatches.telemetry_url[0] -replace 'https://telemetry-cdn.pubg.com/bluehole-pubg', 'https://chickendinner.gg'
$2D_replay_url = $2D_replay_url -replace '-telemetry.json', ''
$winners = ($winmatches | where-object {$_.stats.winPlace -eq 1}).stats.name $winners = ($winmatches | where-object {$_.stats.winPlace -eq 1}).stats.name
$match_stats = Invoke-RestMethod -Uri "https://api.pubg.com/shards/steam/matches/$winid" -Method GET -Headers $headers $match_stats = Invoke-RestMethod -Uri "https://api.pubg.com/shards/steam/matches/$winid" -Method GET -Headers $headers
if($winmatches[0].matchType -eq 'custom'){ if($winmatches[0].matchType -eq 'custom'){
@ -93,6 +95,7 @@ id $($winmatches[0].id)
`````` ``````
"@ "@
send-discord -content $match_settings send-discord -content $match_settings
foreach ($player in $players_to_report.name) { foreach ($player in $players_to_report.name) {
if($null -eq $player){continue} if($null -eq $player){continue}
write-output "creating table for player $player" write-output "creating table for player $player"
@ -135,7 +138,8 @@ id $($winmatches[0].id)
send-discord -content $content_victims send-discord -content $content_victims
} }
send-discord -content "2D replay URL: [2D replay](<$2D_replay_url>) "
$legenda = ' $legenda = '
``` ```
dmg_h = Schade aangericht aan echte spelers dmg_h = Schade aangericht aan echte spelers