Merge pull request #43 from OpzekerIT/dev

formatting
This commit is contained in:
Lanta 2023-09-28 12:56:10 +02:00 committed by GitHub
commit a68e0d8bba

View file

@ -74,11 +74,15 @@ foreach ($winid in $new_win_matches) {
$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 ":partying_face::partying_face::partying_face: Gefeliciteerd $($players -join ', ') :partying_face::partying_face::partying_face:"
send-discord -content "match mode $($winmatches[0].gameMode)" $match_settings = @"
send-discord -content "match type $($winmatches[0].matchType)" ``````
send-discord -content "map $($map_map[$winmatches[0].mapName])" match mode $($winmatches[0].gameMode)
match type $($winmatches[0].matchType)
map $($map_map[$winmatches[0].mapName])
``````
"@
send-discord -content $match_settings
foreach ($player in $all_winners_of_match.name) { foreach ($player in $all_winners_of_match.name) {
write-output "creating tble for player $player" write-output "creating tble for player $player"
$win_stats += [PSCustomObject]@{ $win_stats += [PSCustomObject]@{