Handle lack of gender and description

master
masterhc 1 year ago
parent d5d83c92b0
commit 5937cbbeab

@ -72,13 +72,16 @@ class char extends Command{
.setThumbnail(data.image)
.setTimestamp()
.addFields(
{name:'Gender:', value:data.gender, inline:true},
{name:'Page', value:data.url, inline:true}
);
if(data.age)
{
embed.addFields({name:'Age:',value:data.age, inline:true});
}
if(data.gender)
{
embed.addFields({name:'Gender:', value:data.gender?data.gender:'', inline:true},);
}
if(!data.name.native)
{
embed.setTitle(`${data.name.full}`)

@ -839,7 +839,7 @@ class AnilistCli {
gender:data.Character.gender,
url:data.Character.siteUrl,
image:data.Character.image.medium,
description:data.Character.description,
description:data.Character.description?data.Character.description:' ',
age:data.Character.age,
}

Loading…
Cancel
Save