guides:apps:discord

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

guides:apps:discord [2024-01-19 12:51] – created geekguides:apps:discord [2024-03-22 14:54] (current) – [Webhooks] Add example for sending a message geek
Line 8: Line 8:
  
 Send a file: https://www.autohotkey.com/boards/viewtopic.php?t=86273 Send a file: https://www.autohotkey.com/boards/viewtopic.php?t=86273
 +
 +Send a message:
 +
 +<code AutoHotkey>
 +#Requires AutoHotkey v2
 +webhookURL := "https://discord.com/api/webhooks/..."
 +http := ComObject("WinHttp.WinHttpRequest.5.1")
 +http.Open("POST", webhookURL)
 +http.SetRequestHeader("Content-Type", "application/json")
 +http.Send('{"content": "test"}')
 +</code>