diff --git a/main.js b/main.js index 0368844..db88d2f 100644 --- a/main.js +++ b/main.js @@ -202,7 +202,7 @@ const keywords = isIndex ? undefined : media.toLowerCase().split(' '), matchingPlaylistItems = isIndex ? [playlistItems[parseInt(media) - 1]] - : playlistItems.filter(item => keywords.every(keyword => item.keywords.includes(keyword))); + : playlistItems.filter(item => keywords.every(keyword => item.title.toLowerCase().includes(keyword))); if(matchingPlaylistItems.length === 0) return response = { embed: { title: `❌ Media not found` } }; if(matchingPlaylistItems.length > 1) @@ -248,7 +248,7 @@ const }; const keywords = title.toLowerCase().split(' '), - matchingMediaList = mediaList.filter(item => keywords.every(keyword => item.keywords.includes(keyword))); + matchingMediaList = mediaList.filter(item => keywords.every(keyword => item.title.toLowerCase().includes(keyword))); if(matchingMediaList.length === 0) return response = { embed: { title: `❌ Media not found` } }; if(matchingMediaList.length > 1)