From 81b25c7ebef9fc079af4fd6ee6e8d5b9618564e0 Mon Sep 17 00:00:00 2001 From: NullBite Date: Fri, 20 Oct 2023 01:44:09 -0400 Subject: [PATCH] Initial commit --- cclink.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 cclink.lua diff --git a/cclink.lua b/cclink.lua new file mode 100644 index 0000000..613344c --- /dev/null +++ b/cclink.lua @@ -0,0 +1,21 @@ +BASE_URL="https://node.protogen.io/secret-endpoint" +WEBHOOKS={ + -- wehbook when powered + [true] = BASE_URL .. "/ping", + -- wehbook when unpowered + [false] = BASE_URL .. "/", +} +-- example +-- PAYLOAD="meow! :3" +PAYLOAD=nil + +while true do + state=false + os.pullEvent("redstone") + for _, v in pairs(redstone.getSides()) do + if redstone.getInput(v) == true then + state=true + end + end + http.request(WEBHOOKS[state], PAYLOAD) +end