fixes for discord scripts #99

Merged
OpzekerIT merged 2 commits from dev into main 2023-11-13 09:31:50 +00:00
2 changed files with 8 additions and 2 deletions
Showing only changes of commit f51baf1520 - Show all commits

View file

@ -1,3 +1,5 @@
Start-Transcript -Path '/var/log/dtch/report_new_matches.log' -Append
if ($PSScriptRoot.length -eq 0) {
$scriptroot = Get-Location
}
@ -168,3 +170,4 @@ $newJson = $player_matches | ConvertTo-Json -Depth 100
$newJson | out-file "$scriptroot/../data/player_matches.json"
remove-lock
Stop-Transcript

View file

@ -1,3 +1,5 @@
Start-Transcript -Path '/var/log/report_new_matches.log' -Append
if ($PSScriptRoot.length -eq 0) {
$scriptroot = Get-Location
}
@ -97,3 +99,4 @@ $payload = [PSCustomObject]@{
Invoke-RestMethod -Uri $webhookurl -Method Post -Body ($payload | ConvertTo-Json) -ContentType 'Application/Json'
remove-lock
Stop-Transcript