Last active
September 16, 2018 03:25
-
-
Save treeherder/71b5079265dd1f3eb298213eca64a119 to your computer and use it in GitHub Desktop.
broken webhook on jar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 "[email protected]"}) | |
(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