diff --git a/base/JaBa.js b/base/JaBa.js index caa71675..8ea99383 100644 --- a/base/JaBa.js +++ b/base/JaBa.js @@ -49,13 +49,12 @@ class JaBa extends Client { if (this.config.apiKeys.amethyste) this.AmeAPI = new AmeClient(this.config.apiKeys.amethyste); this.icanhazdadjoke = async function() { const joke = await fetch("https://icanhazdadjoke.com/", { - method: "GET", headers: { "Accept": "application/json" } }); - return joke; + return joke.json(); }; this.player = new DisTube.default(this, { diff --git a/commands/Fun/joke.js b/commands/Fun/joke.js index 44bfc3c7..2b06541f 100644 --- a/commands/Fun/joke.js +++ b/commands/Fun/joke.js @@ -19,7 +19,7 @@ class Joke extends Command { async run(message, args, data) { const joke = await this.client.icanhazdadjoke(); - if (joke.status !== "200") return; + if (joke.status === 200) return message.error("misc:ERR_OCCURRED"); const embed = new Discord.MessageEmbed() .setDescription(joke.joke) diff --git a/commands/Images/bed.js b/commands/Images/bed.js index 911921fb..a41f7833 100644 --- a/commands/Images/bed.js +++ b/commands/Images/bed.js @@ -41,7 +41,7 @@ class Bed extends Command { }); } catch (e) { console.log(e); - m.error("misc:ERROR_OCCURRED", null, { + m.error("misc:ERR_OCCURRED", null, { edit: true }); } diff --git a/commands/Images/clyde.js b/commands/Images/clyde.js index 3ce9c40d..f8099ec6 100644 --- a/commands/Images/clyde.js +++ b/commands/Images/clyde.js @@ -36,7 +36,7 @@ class Clyde extends Command { m.delete(); } catch (e) { console.log(e); - m.error("misc:ERROR_OCCURRED", null, { + m.error("misc:ERR_OCCURRED", null, { edit: true }); } diff --git a/commands/Images/love.js b/commands/Images/love.js index 74cefcdf..f7fac6fd 100644 --- a/commands/Images/love.js +++ b/commands/Images/love.js @@ -37,7 +37,7 @@ class Love extends Command { m.delete(); } catch (e) { console.log(e); - m.error("misc:ERROR_OCCURRED", null, { + m.error("misc:ERR_OCCURRED", null, { edit: true }); } diff --git a/commands/Images/phcomment.js b/commands/Images/phcomment.js index c5d494b1..197cd23d 100644 --- a/commands/Images/phcomment.js +++ b/commands/Images/phcomment.js @@ -47,7 +47,7 @@ class Phcomment extends Command { }); } catch (e) { console.log(e); - m.error("misc:ERROR_OCCURRED", null, { + m.error("misc:ERR_OCCURRED", null, { edit: true }); }