aboutsummaryrefslogtreecommitdiff
path: root/http.js
diff options
context:
space:
mode:
Diffstat (limited to 'http.js')
-rw-r--r--http.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/http.js b/http.js
index 36f2555..4572419 100644
--- a/http.js
+++ b/http.js
@@ -58,7 +58,7 @@ module.exports = {
.then(data => msg.channel.send(`<@!${target}> ${data}`))
}
},
- joke: {
+ chucknorris: {
func: (msg, [first, last]) => {
if (!first) {
first = "Chuck"
@@ -72,6 +72,11 @@ module.exports = {
.then(data => msg.reply(data.value.joke.replace(/&quot;/g, "\"").replace(/ /g, " ")))
}
},
+ joke: {
+ func: msg => fetch("https://v2.jokeapi.dev/joke/Any")
+ .then(res => res.json())
+ .then(data => msg.reply(data.type == "single" ? data.joke : data.setup + "\n" + "||" + data.delivery + "||"))
+ },
"8ball": {
func: msg => fetch("https://8ball.delegator.com/magic/JSON/whatever")
.then(res => res.json())