This commit is contained in:
Daniel Odendahl Jr
2017-08-18 19:06:11 +00:00
parent c488bbf6c8
commit b8a3877863
9 changed files with 20 additions and 11 deletions
+2 -2
View File
@@ -19,8 +19,8 @@ module.exports = class FortuneCommand extends Command {
.query({ limit: 1 });
return msg.say(stripIndents`
${body[0].fortune.message}
Lotto: ${body[0].lotto.numbers.join(', ')}
Lesson: ${body[0].lesson.chinese} (${body[0].lesson.pronunciation}): ${body[0].lesson.english}
${body[0].lotto.numbers.join(', ')}
${body[0].lesson.chinese} (${body[0].lesson.pronunciation}): ${body[0].lesson.english}
`);
}
};
+2 -8
View File
@@ -1,5 +1,4 @@
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const snekfetch = require('snekfetch');
module.exports = class QuoteCommand extends Command {
@@ -8,18 +7,13 @@ module.exports = class QuoteCommand extends Command {
name: 'quote',
group: 'random-res',
memberName: 'quote',
description: 'Responds with a random quote.',
clientPermissions: ['EMBED_LINKS']
description: 'Responds with a random quote.'
});
}
async run(msg) {
const { body } = await snekfetch
.get('https://talaikis.com/api/quotes/random/');
const embed = new MessageEmbed()
.setColor(0x9797FF)
.setAuthor(body.author)
.setDescription(body.quote);
return msg.embed(embed);
return msg.say(`${body.quote} - _${body.author}_`);
}
};