I figured out the following to let users send custom messages via scheduled task to their discord for any game with out the use of a bot, using powershell custom actions
I used the following custom variables:
discord_username, discord_avatarurl, discord_message, discord_webhook
$payload = [PSCustomObject]@{
username = $ThisService.Variables.Values["discord_username"]
avatar_url = $ThisService.Variables.Values["discord_avatarurl"]
content = $ThisService.Variables.Values["discord_message"]
}
Invoke-RestMethod -Uri $ThisService.Variables.Values["discord_webhook"] -Method Post -Body ($payload | ConvertTo-Json -Depth 100) -ContentType 'application/json'
Make sure your variables are set as script parameters: https://help.tcadmin.com/Custom_Scripts#Capture_values_before_executing_the_script