diff options
| author | ubq323 <ubq323@ubq323.website> | 2025-02-25 23:36:28 +0000 |
|---|---|---|
| committer | ubq323 <ubq323@ubq323.website> | 2025-02-25 23:36:28 +0000 |
| commit | e03937bbe51f3dd8e0d8ecc732999f5c4578fa94 (patch) | |
| tree | 7c4e9c9427eade79d122d1175e273cc1eae170be /discord.lua | |
| parent | 7d396195e4f97a094610fecc658aed6a67fd464d (diff) | |
mostly getting it to just go, also start on discord
Diffstat (limited to 'discord.lua')
| -rw-r--r-- | discord.lua | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/discord.lua b/discord.lua deleted file mode 100644 index 27e0644..0000000 --- a/discord.lua +++ /dev/null @@ -1,24 +0,0 @@ -local http_request = require'http.request' -local dkjson = require'dkjson' -local url = 'https://discord.com/api/v8/webhooks/1277689699254800436/gzYU3voeunQsEdC797-hgXdTIbJDk09IVuj6l1t2alqbX9xS0d_St7bDWRkagUuQ3sat' - -local function exec_webhook(url, payload, debug) - local req = http_request.new_from_uri(url) - req.headers:upsert('content-type','application/json') - req.headers:upsert(':method','POST') - req:set_body(dkjson.encode(payload)) - local resp_head, resp_body = assert(req:go()) - local status = resp_head:get':status' - if debug then - resp_head:dump() - print() - print(resp_body:get_body_as_string()) - end - assert(status:sub(1,1) == '2', 'status was '..status..' not 2xx') -end - -return { grom = function(from,body) print(body) exec_webhook(url, { - content=body, - username=from, - }, true) end } - |
