From 1d7214f95a50516d13ab4b95ddea926f66df9e88 Mon Sep 17 00:00:00 2001 From: TheCakeChicken Date: Thu, 26 Mar 2020 14:04:34 +0000 Subject: [PATCH] make the bot stop typing --- src/commands/catfact.js | 2 +- src/commands/dogfact.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/commands/catfact.js b/src/commands/catfact.js index a58aae4..366999e 100644 --- a/src/commands/catfact.js +++ b/src/commands/catfact.js @@ -7,8 +7,8 @@ exports.run = async (bot, message, args) => { .then(json => message.channel.send(`__**Did you know?**__\n${json.data[0].fact}`)) } catch(err) { message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`); - message.channel.stopTyping(); }; + message.channel.stopTyping(); }; exports.conf = { diff --git a/src/commands/dogfact.js b/src/commands/dogfact.js index d0b80ed..fca8a62 100644 --- a/src/commands/dogfact.js +++ b/src/commands/dogfact.js @@ -5,11 +5,10 @@ exports.run = async (bot, message, args) => { fetch('https://dog-api.kinduff.com/api/facts') .then(res => res.json()) .then(json => message.channel.send(`__**Did you know?**__\n ${json.facts[0]}`)); - message.channel.stopTyping(); } catch(err) { message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`); - message.channel.stopTyping(); }; + message.channel.stopTyping(); }; exports.conf = {