From 8db7796c1a4a29bfdf6db93a2eb5d9ec38aebf1f Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 19 May 2021 17:33:12 -0400 Subject: [PATCH] Fix --- commands/search/smash-bros.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/search/smash-bros.js b/commands/search/smash-bros.js index 6fbd008a..56c6bb28 100644 --- a/commands/search/smash-bros.js +++ b/commands/search/smash-bros.js @@ -34,11 +34,11 @@ module.exports = class SmashBrosCommand extends Command { async run(msg, { query }) { try { const fighters = await this.fetchFighters(); - const found = fighters.find(fighter => { + const fighter = fighters.find(fighter => { const search = query.toLowerCase().replaceAll(' ', '_').replace(/[^A-Z_]/i, ''); return search === fighter.slug; }); - if (!found) return msg.say('Could not find any results.'); + if (!fighter) return msg.say('Could not find any results.'); const embed = new MessageEmbed() .setColor(fighter.color) .setTitle(fighter.name)