Remove obsolete upload-to-discord.ps1

This commit is contained in:
Markus Fleschutz
2023-12-13 10:01:56 +01:00
parent 6d65fda172
commit d416115737
2 changed files with 0 additions and 66 deletions

View File

@ -1,22 +0,0 @@
function Upload-Discord {
[CmdletBinding()]
param (
[parameter(Position=0,Mandatory=$False)]
[string]$file,
[parameter(Position=1,Mandatory=$False)]
[string]$text
)
$hookurl = 'YOUR-DISCORD-WEBHOOK'
$Body = @{
'username' = $env:username
'content' = $text
}
if (-not ([string]::IsNullOrEmpty($text))){
Invoke-RestMethod -ContentType 'Application/Json' -Uri $hookurl -Method Post -Body ($Body | ConvertTo-Json)};
if (-not ([string]::IsNullOrEmpty($file))){curl.exe -F "file1=@$file" $hookurl}
}