Skip to content

Instantly share code, notes, and snippets.

@treeherder
Last active September 16, 2018 03:25
Show Gist options
  • Save treeherder/71b5079265dd1f3eb298213eca64a119 to your computer and use it in GitHub Desktop.
Save treeherder/71b5079265dd1f3eb298213eca64a119 to your computer and use it in GitHub Desktop.
broken webhook on jar
(ns lamia.core
(:require
[org.httpkit.client :as http]
[cheshire.core :as json])
(:gen-class))
(def hook "hardcoded web address")
(defn bothook_response
"please."
[wh]
(http/get wh))
(defn wh_data
"fml"
[]
(json/decode (@(bothook_response hook) :body)))
(def user_object
{:username "Gabija"
:discriminator nil
:id 268177054795694080
:avatar nil
:verified true
:email "gabija@tosg.chan"})
(defn -main
"I don't do a whole lot ... yet."
[& message]
(let [wh_d (wh_data)
cid (wh_d "channel_id")
tok (wh_d "token")
gid (wh_d "guild_id")
uid (wh_d "id")
fps {:name "Disco Bot"
:channel_id cid
:token tok
:avatar nil
:guild_id gid
:id uid
:user user_object
:content message}]
(do
(http/post hook {:form-params fps})
(prn wh_d)
(prn (format "hooking args %s" message))
(prn "posted."))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment