From 019730fa1567e6d7e183d631ef99d28f6de9f9e4 Mon Sep 17 00:00:00 2001 From: Earl Duque <31702109+earlduque@users.noreply.github.com> Date: Sat, 30 Sep 2023 05:26:32 -0700 Subject: [PATCH 1/2] Update AJB emoji spam.js --- Parsers/AJB emoji spam.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/Parsers/AJB emoji spam.js b/Parsers/AJB emoji spam.js index 2489c0c..b7d399a 100644 --- a/Parsers/AJB emoji spam.js +++ b/Parsers/AJB emoji spam.js @@ -18,8 +18,6 @@ var choices = [ ':ajbheadswillroll:' ]; -//test - //Store the numerical value of the second split var split = parseInt((current.text.split(' ')[1]), 10); var text; From bbee4ffb97c1b7a9029eaaeb28ddb5ca6d07f1c0 Mon Sep 17 00:00:00 2001 From: Earl Duque <31702109+earlduque@users.noreply.github.com> Date: Sat, 30 Sep 2023 05:35:08 -0700 Subject: [PATCH 2/2] Create Random fact generator.js --- Parsers/Random fact generator.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Parsers/Random fact generator.js diff --git a/Parsers/Random fact generator.js b/Parsers/Random fact generator.js new file mode 100644 index 0000000..b9af543 --- /dev/null +++ b/Parsers/Random fact generator.js @@ -0,0 +1,13 @@ +/* +activation_example:!fact +regex:!fact +flags:gmi +*/ +var prompt = current.text.replace(/!chatgpt/gmi, "").trim().substring(0, 1000); +var chatReq = new sn_ws.RESTMessageV2(); +chatReq.setEndpoint('http://numbersapi.com/random'); +chatReq.setHttpMethod("GET"); +var chatResponse = chatReq.execute(); +var chatResponseBody =chatResponse.getBody(); + +new x_snc_slackerbot.Slacker().send_chat(current, chatResponseBody, false);