From ac8b79e79ad70ebe31e71d82316111679f8a74da Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 18 Apr 2021 12:51:46 -0400 Subject: [PATCH] Fix lint --- commands/random-img/frog.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/commands/random-img/frog.js b/commands/random-img/frog.js index 94a98f38..75e32a12 100644 --- a/commands/random-img/frog.js +++ b/commands/random-img/frog.js @@ -20,13 +20,9 @@ module.exports = class FrogCommand extends Command { }); } - async run(msg) { - try { - const chosen = Math.floor(Math.random() * 54) + 1; - const str = chosen.toString().padStart(4, '0'); - return msg.say({ files: [`http://www.allaboutfrogs.org/funstuff/random/${str}.jpg`] }); - } catch (err) { - return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); - } + run(msg) { + const chosen = Math.floor(Math.random() * 54) + 1; + const str = chosen.toString().padStart(4, '0'); + return msg.say({ files: [`http://www.allaboutfrogs.org/funstuff/random/${str}.jpg`] }); } };