Merge pull request #34 from OpzekerIT/dev

chicken
This commit is contained in:
Lanta 2023-09-27 14:22:32 +02:00 committed by GitHub
commit a6e965abea

View file

@ -6,7 +6,7 @@ else {
$scriptroot = $PSScriptRoot $scriptroot = $PSScriptRoot
} }
Start-Transcript "$scriptroot/debug.txt" -Append
$fileContent = Get-Content -Path "$scriptroot/../config/config.php" -Raw $fileContent = Get-Content -Path "$scriptroot/../config/config.php" -Raw
@ -59,7 +59,7 @@ foreach ($winid in $new_win_matches) {
$players = $winmatches.stats.name $players = $winmatches.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
$all_winners_of_match = ($match_stats.included.attributes.stats | where-object { $_.winplace -eq 1 }) $all_winners_of_match = ($match_stats.included.attributes.stats | where-object { $_.winplace -eq 1 })
send-discord -content ":chicken: :chicken: CHICKEN CHICKEN WINNER DINNER!! :chicken: :chicken:" send-discord -content ":chicken: :chicken: **CHICKEN CHICKEN WINNER DINNER!!** :chicken: :chicken:"
send-discord -content "Gefeliciteerd $($players -join ' ')" send-discord -content "Gefeliciteerd $($players -join ' ')"
send-discord -content "match mode $($winmatches[0].gameMode)" send-discord -content "match mode $($winmatches[0].gameMode)"
send-discord -content "match type $($winmatches[0].matchType)" send-discord -content "match type $($winmatches[0].matchType)"
@ -112,5 +112,3 @@ $newJson = $player_matches | ConvertTo-Json -Depth 100
# Display the updated JSON # Display the updated JSON
$newJson | out-file "$scriptroot/../data/player_matches.json" $newJson | out-file "$scriptroot/../data/player_matches.json"
Stop-Transcript