From f1c4f83a995a3eb2fd462aff6811136a68367089 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Mon, 20 Dec 2021 14:56:32 -0700 Subject: [PATCH] more efficient fav char listing --- commands/anime/char.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/anime/char.js b/commands/anime/char.js index 230897e..d919c65 100644 --- a/commands/anime/char.js +++ b/commands/anime/char.js @@ -278,7 +278,7 @@ module.exports = { let cf = await CF.findOne({uid: mention ? mention.id : message.author.id}); if (!cf || !cf.loved.length) {return message.channel.send(`Looks like ${mention ? 'they' : 'you'} haven't favorited any characters!`);} let chars = cf.loved; - chars = chars.map(tc => Array.from(client.misc.cache.chars.keys()).filter(c => client.misc.cache.chars.get(c) === tc)); + chars = chars.map(tc => client.misc.cache.charsID.get(tc)); let n = mention ? message.guild ? message.mentions.members.first().displayName : message.mentions.users.first().username : message.guild ? message.member.displayName : message.author.username; return message.channel.send({embeds: [ new Discord.MessageEmbed()