From 940614e57f34cb8b401c2ad6b24d9b88a0216424 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 16 Feb 2019 02:19:57 +0000 Subject: [PATCH] Fix character names --- commands/search/character.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/search/character.js b/commands/search/character.js index c740fa1d..c736bb36 100644 --- a/commands/search/character.js +++ b/commands/search/character.js @@ -14,7 +14,10 @@ const resultGraphQL = stripIndents` query ($id: Int!) { Character (id: $id) { id - name { native } + name { + first + last + } image { large medium @@ -70,7 +73,7 @@ module.exports = class CharacterCommand extends Command { .setAuthor('AniList', 'https://i.imgur.com/iUIRC7v.png', 'https://anilist.co/') .setURL(character.siteUrl) .setThumbnail(character.image.large || character.image.medium || null) - .setTitle(character.name.native) + .setTitle(`${character.name.first || ''}${character.name.last ? ` ${character.name.last}` : ''}`) .setDescription(character.description ? shorten(character.description.replace(/(
)+/g, '\n')) : 'No description.')