SHARE
TWEET

Discord Webhook [OC]

Antwanr942 Jul 17th, 2019 (edited) 133 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local internet = require("internet")  
  2. local event = require("event")
  3. local json = require("JSON")
  4.  
  5. local webhook = "https://discordapp.com/api/webhooks/601451367483179143/dJHIG4Sv-icki06oYQPjJdJ0MOUGm9uLvl5BBqQeG6Wy5sF4eAej710jhG-9WIdvD6sv"
  6.  
  7. local response = internet.request(webhook, json:encode({content = "@everyone"}), {["Content-Type"] = "application/json"})
  8.  
  9. event.pull(3, "internet_ready")
  10.  
  11. assert(response.finishConnect())
  12.  
  13. local code, message, headers = response.response()
  14. print(("Got response: %d %s"):format(code, message))
  15. print(("Returned Header: %d"):format(headers))
  16. print("Body: ")
  17.  
  18. for chunk in response do
  19.   io.write(chunk)
  20. end
  21.  
  22. print()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top