mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Fix
This commit is contained in:
@@ -24,14 +24,18 @@ const resultGraphQL = stripIndents`
|
|||||||
}
|
}
|
||||||
description(asHtml: false)
|
description(asHtml: false)
|
||||||
siteUrl
|
siteUrl
|
||||||
characters(page: 1, perPage: 5) {
|
characterMedia(page: 1, perPage: 5) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
name {
|
title {
|
||||||
full
|
english
|
||||||
|
romaji
|
||||||
}
|
}
|
||||||
|
type
|
||||||
siteUrl
|
siteUrl
|
||||||
}
|
}
|
||||||
|
characterRole
|
||||||
|
staffRole
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
staffMedia(page: 1, perPage: 5) {
|
staffMedia(page: 1, perPage: 5) {
|
||||||
@@ -94,10 +98,13 @@ module.exports = class AnimeStaffCommand extends Command {
|
|||||||
.setThumbnail(staff.image.large || staff.image.medium || null)
|
.setThumbnail(staff.image.large || staff.image.medium || null)
|
||||||
.setTitle(`${staff.name.first || ''}${staff.name.last ? ` ${staff.name.last}` : ''}`)
|
.setTitle(`${staff.name.first || ''}${staff.name.last ? ` ${staff.name.last}` : ''}`)
|
||||||
.setDescription(staff.description ? cleanAnilistHTML(staff.description, false) : 'No description.')
|
.setDescription(staff.description ? cleanAnilistHTML(staff.description, false) : 'No description.')
|
||||||
.addField('❯ Voice Roles', staff.characters.edges.length
|
.addField('❯ Voice Roles',
|
||||||
? trimArray(staff.characters.edges.map(edge => embedURL(edge.name.full, edge.node.siteUrl)), 5).join(', ')
|
staff.characterMedia.edges.length ? trimArray(staff.characterMedia.edges.map(edge => {
|
||||||
: 'None')
|
const title = edge.node.title.english || edge.node.title.romaji;
|
||||||
.addField('❯ Production Roles', staff.staffMedia.edges.length ? trimArray(staff.staffMedia.edges.map(edge => {
|
return embedURL(`${title} (${types[edge.node.type]})`, edge.node.siteUrl);
|
||||||
|
}), 5).join(', ') : 'None')
|
||||||
|
.addField('❯ Production Roles',
|
||||||
|
staff.staffMedia.edges.length ? trimArray(staff.staffMedia.edges.map(edge => {
|
||||||
const title = edge.node.title.english || edge.node.title.romaji;
|
const title = edge.node.title.english || edge.node.title.romaji;
|
||||||
return embedURL(`${title} (${types[edge.node.type]})`, edge.node.siteUrl);
|
return embedURL(`${title} (${types[edge.node.type]})`, edge.node.siteUrl);
|
||||||
}), 5).join(', ') : 'None');
|
}), 5).join(', ') : 'None');
|
||||||
|
|||||||
Reference in New Issue
Block a user