Better display of new and old info about animes, propagation of fix to manga.

master
masterhc 1 year ago
parent 2a4e98224a
commit 95679a7cc0

@ -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(

@ -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')

@ -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:'')
}
}
/**

Loading…
Cancel
Save