Answers for "Send discord webhook message with autohotkey"

0

Send discord webhook message with autohotkey

url:="webhookboturlgoesherebutwasredactedforreddit" ; use the url from Discord webhook bot
postdata=
(
{
  "content": "[Test](https://www.google.com/)",
  "embeds": [
    {
      "title": "Double Test",
      "description": "[](https://www.google.com/)",
      "url": "https://www.google.com/",
      "color": 8280002,
      "thumbnail": {
        "url": "https://i.imgur.com/KiRApYa.jpg"
      },
      "image": {
        "url": "https://i.imgur.com/KiRApYa.jpg"
      }
    }
  ]
}
) ; Use https://leovoel.github.io/embed-visualizer/ to generate above webhook code

WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("POST", url, false)
WebRequest.SetRequestHeader("Content-Type", "application/json")
WebRequest.Send(postdata)
Posted by: Guest on December-27-2020

Code answers related to "Send discord webhook message with autohotkey"

Browse Popular Code Answers by Language