aboutsummaryrefslogtreecommitdiff
path: root/src/commands/jokes.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/jokes.js')
-rw-r--r--src/commands/jokes.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/commands/jokes.js b/src/commands/jokes.js
deleted file mode 100644
index 578e51b..0000000
--- a/src/commands/jokes.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const fetch = require('node-fetch');
-
-function randomJokes(message) {
- message.channel.startTyping();
- getJokes().then(response => {
- message.channel.stopTyping();
- if (response) {
- message.channel.startTyping();
- message.reply(response.setup);
- setTimeout(() => {
- message.channel.stopTyping();
- message.reply(`||${response.punchline}||`);
- }, 5000);
- }
- });
-}
-
-async function getJokes() {
- return fetch(`https://official-joke-api.appspot.com/jokes/random`)
- .then(res => res.json())
-}
-
-
-module.exports = {
- execute(client,message, args) {
- randomJokes(message);
- }
-} \ No newline at end of file