This commit is contained in:
Dragon Fire
2021-05-19 17:47:38 -04:00
parent 77928b85da
commit baaf8f6046
+2 -2
View File
@@ -34,9 +34,9 @@ module.exports = class SmashBrosCommand extends Command {
async run(msg, { query }) {
try {
const fighters = await this.fetchFighters();
const fighter = fighters.find(fighter => {
const fighter = fighters.find(char => {
const search = this.makeSlug(query).replace('_and_', '_&_');
return search === fighter.slug || fighter.alias === search;
return search === char.slug || char.alias === search;
});
if (!fighter) return msg.say('Could not find any results.');
const embed = new MessageEmbed()