From f87dc8a759ce4bd844fe4111e6a2d53adc673641 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 18 Apr 2020 19:38:34 -0400 Subject: [PATCH] Fix lint --- commands/events/anime-airing.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/commands/events/anime-airing.js b/commands/events/anime-airing.js index 7747fbd2..a6a5d382 100644 --- a/commands/events/anime-airing.js +++ b/commands/events/anime-airing.js @@ -44,13 +44,14 @@ module.exports = class AnimeAiringCommand extends Command { try { const anime = await this.getList(); if (!anime) return msg.say('No anime air today...'); + const mapped = anime.map(ani => { + const title = ani.media.title.english || ani.media.title.romaji; + const airingAt = moment(ani.airingAt * 1000).tz('Asia/Tokyo').format('h:mm A'); + return `• ${title} (@${airingAt} JST)`; + }); return msg.say(stripIndents` **Anime Airing on ${moment().tz('Asia/Tokyo').format('dddd, MMMM Do, YYYY')}** - ${anime.map(ani => { - const title = ani.media.title.english || ani.media.title.romaji; - const airingAt = moment(ani.airingAt * 1000).tz('Asia/Tokyo').format('h:mm A'); - return `• ${title} (@${airingAt} JST)` - }).join('\n')} + ${mapped.join('\n')} `); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);