diff --git a/commands/search/searchAnime.js b/commands/search/searchAnime.js index bb46cad..6c03bdc 100644 --- a/commands/search/searchAnime.js +++ b/commands/search/searchAnime.js @@ -36,7 +36,7 @@ class anime extends Command{ .setStyle(ButtonStyle.Success) ); } - embed.setTitle(`First ${data.length>=4?'4':(data.length + ' and only')} results of search:`) + embed.setTitle(`First ${data.length>=4?'4':(data.length + ' and only')} result${data.length>1?'s':''} of search:`) .setAuthor({name:"Rem-chan", iconURL:"https://i.imgur.com/g6FSNhL.png",url:'https://rem.wordfights.com/addtodiscord'}) .setColor(0x003284) .setURL('https://www.rem.wordfights.com') @@ -60,7 +60,7 @@ class anime extends Command{ const data = await new aniList().getAnimeInfo(id); // console.log('Command: SearchChar: SendMessage: Data', data.season) const embed = new EmbedBuilder() - .setTitle(`${data.title.romaji} (${data.title.native} / ${data.title.english?data.title.english:''})`) + .setTitle(`${data.title.romaji} (${data.title.native + data.title.english?'/'+data.title.english:''})`) .setAuthor({name:"Rem-chan", iconURL:"https://i.imgur.com/g6FSNhL.png",url:'https://rem.wordfights.com/addtodiscord'}) .setColor(0x003284) .setDescription(data.description.replaceAll('~! ', '').replaceAll(/<[^>]*>/g, '').substring(0, 1500) + "...") @@ -69,13 +69,20 @@ class anime extends Command{ .setThumbnail(data.coverImage) .setTimestamp() .addFields( - {name:'Status:', value:data.status, inline:true}, - {name:'Episodes:', value:data.episodes?data.episodes.toString():'N/A', inline:true}, + {name:'Status:', value:data.status.replaceAll('_',' '), inline:true}, + ); + if(data.status!='NOT_YET_RELEASED') + { + embed.addFields( + {name:'Release Season:', value:data.season, inline:true}, + {name:'Episodes:', value:data.episodes?data.episodes.toString():'N/A', inline:true} + ); + } + embed.addFields( {name:'Trailer:', value:data.trailer?(data.trailer.site=='youtube'?`https://www.youtube.com/watch?v=${data.trailer.id}`:`https://www.dailymotion.com/video/${data.trailer.id}`):'N/A'}, - {name:'Release Season:', value:data.season, inline:true}, {name:'MAL Page', value:data.malLink, inline:true}, {name:'AniList Page', value:data.url, inline:true} - ); + ) const randomID = Random(); const row = new ActionRowBuilder() .addComponents( diff --git a/commands/search/searchManga.js b/commands/search/searchManga.js index beb4653..5d28d03 100644 --- a/commands/search/searchManga.js +++ b/commands/search/searchManga.js @@ -36,7 +36,7 @@ class manga extends Command{ ); } - embed.setTitle(`First ${data.length>=4?'4':(data.length + ' and only')} results of search:`) + embed.setTitle(`First ${data.length>=4?'4':(data.length + ' and only')} result${data.length>1?'s':''} of search:`) .setAuthor({name:"Rem-chan", iconURL:"https://i.imgur.com/g6FSNhL.png",url:'https://rem.wordfights.com/addtodiscord'}) .setColor(0x003284) .setURL('https://www.rem.wordfights.com') diff --git a/lib.js b/lib.js index b420ae1..8f2b9ac 100644 --- a/lib.js +++ b/lib.js @@ -739,7 +739,7 @@ class aniListCli { trailer:data.Media.trailer, description:data.Media.description, coverImage:data.Media.coverImage.large, - season: data.Media.season + data.Media.seasonYear + season: (data.Media.season?data.Media.season:'') + ' ' + (data.Media.seasonYear?data.Media.seasonYear:'') } } /**