mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Fix lint
This commit is contained in:
@@ -44,13 +44,14 @@ module.exports = class AnimeAiringCommand extends Command {
|
|||||||
try {
|
try {
|
||||||
const anime = await this.getList();
|
const anime = await this.getList();
|
||||||
if (!anime) return msg.say('No anime air today...');
|
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`
|
return msg.say(stripIndents`
|
||||||
**Anime Airing on ${moment().tz('Asia/Tokyo').format('dddd, MMMM Do, YYYY')}**
|
**Anime Airing on ${moment().tz('Asia/Tokyo').format('dddd, MMMM Do, YYYY')}**
|
||||||
${anime.map(ani => {
|
${mapped.join('\n')}
|
||||||
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')}
|
|
||||||
`);
|
`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||||
|
|||||||
Reference in New Issue
Block a user