diff --git a/commands/search/searchAnime.js b/commands/search/searchAnime.js index 6b7fa0f..fc74ba6 100644 --- a/commands/search/searchAnime.js +++ b/commands/search/searchAnime.js @@ -16,7 +16,7 @@ class anime extends Command{ } async run(message, args){ const data = await new aniList().searchAnime(args.join(' ')); - + console.log(data) const embed = new EmbedBuilder() .setTitle(`${data.title.romaji} (${data.title.native} / ${data.title.english})`) .setAuthor({name:"Rem-chan", iconURL:"https://i.imgur.com/g6FSNhL.png",url:'https://rem.wordfights.com/addtodiscord'}) @@ -28,7 +28,7 @@ class anime extends Command{ .setTimestamp() .addFields( {name:'Status:', value:data.status, inline:true}, - {name:'Episodes:', value:data.episodes.toString(), inline:true}, + {name:'Episodes:', value:data.episodes?data.episodes.toString():'N/A', inline:true}, {name:'Trailer:', value:data.trailer?(data.trailer.site=='yotube'?`https://www.youtube.com/watch?v=${data.trailer.id}`:`https://www.dailymotion.com/video/${data.trailer.id}`):'N/A'}); const randomID = Random(); const row = new ActionRowBuilder()