From 32c2b516666b03227522c0053d39a73f48248bd7 Mon Sep 17 00:00:00 2001 From: Lanta Date: Fri, 18 Apr 2025 13:05:11 +0200 Subject: [PATCH] payloud empty --- discord/report_new_matches.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/discord/report_new_matches.ps1 b/discord/report_new_matches.ps1 index a80b9e9..8447f1a 100644 --- a/discord/report_new_matches.ps1 +++ b/discord/report_new_matches.ps1 @@ -69,7 +69,13 @@ function send-discord-losers { $payload = [PSCustomObject]@{ content = $content } + if($payload.content -eq "") { + $payload = [PSCustomObject]@{ + content = "Nothing to report" + } + } Invoke-RestMethod -Uri $webhookurl_losers -Method Post -Body ($payload | ConvertTo-Json) -ContentType 'Application/Json' + } $map_map = @{ -- 2.49.1