From 7e15639bb3011c38a53c6c9c47491ffbb4278d7d Mon Sep 17 00:00:00 2001 From: Lanta Date: Thu, 10 Apr 2025 12:53:36 +0200 Subject: [PATCH] fix for custom met bots --- discord/report_new_matches.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/discord/report_new_matches.ps1 b/discord/report_new_matches.ps1 index 83462d3..e70b450 100644 --- a/discord/report_new_matches.ps1 +++ b/discord/report_new_matches.ps1 @@ -95,14 +95,14 @@ foreach ($winid in $new_win_matches) { $2D_replay_url = $2D_replay_url + "?follow=$($winners[0])" $match_stats = Invoke-RestMethod -Uri "https://api.pubg.com/shards/steam/matches/$winid" -Method GET -Headers $headers - if($winmatches[0].gameMode -eq 'tdm' ){ + if ($winmatches[0].gameMode -eq 'tdm' ) { continue } #skip tdm matches if ($winmatches[0].matchType -eq 'custom') { - $players_to_report = $match_stats.included.attributes.stats + $players_to_report = $match_stats.included.attributes.stats | where-object { $_.playerId -notlike "ai.*" } } else { - $players_to_report = ($match_stats.included.attributes.stats | where-object { $_.winplace -eq 1 }) + $players_to_report = $match_stats.included.attributes.stats | where-object { $_.winplace -eq 1 } } if ($new_win_matches.count -le 10) { -- 2.49.1