discord logging
This commit is contained in:
parent
dc2652fc61
commit
988d9458a9
2 changed files with 8 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
Start-Transcript -Path '/var/log/dtch/report_new_matches.log' -Append
|
||||||
|
|
||||||
if ($PSScriptRoot.length -eq 0) {
|
if ($PSScriptRoot.length -eq 0) {
|
||||||
$scriptroot = Get-Location
|
$scriptroot = Get-Location
|
||||||
}
|
}
|
||||||
|
|
@ -167,4 +169,5 @@ $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"
|
||||||
|
|
||||||
remove-lock
|
remove-lock
|
||||||
|
Stop-Transcript
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
Start-Transcript -Path '/var/log/report_new_matches.log' -Append
|
||||||
|
|
||||||
if ($PSScriptRoot.length -eq 0) {
|
if ($PSScriptRoot.length -eq 0) {
|
||||||
$scriptroot = Get-Location
|
$scriptroot = Get-Location
|
||||||
}
|
}
|
||||||
|
|
@ -96,4 +98,5 @@ $payload = [PSCustomObject]@{
|
||||||
}
|
}
|
||||||
|
|
||||||
Invoke-RestMethod -Uri $webhookurl -Method Post -Body ($payload | ConvertTo-Json) -ContentType 'Application/Json'
|
Invoke-RestMethod -Uri $webhookurl -Method Post -Body ($payload | ConvertTo-Json) -ContentType 'Application/Json'
|
||||||
remove-lock
|
remove-lock
|
||||||
|
Stop-Transcript
|
||||||
Loading…
Add table
Add a link
Reference in a new issue