This commit is contained in:
Daniel Odendahl Jr
2017-09-27 16:49:37 +00:00
parent 9f1b9688ae
commit 8a70e44902
16 changed files with 88 additions and 18 deletions
+4 -2
View File
@@ -35,9 +35,11 @@ module.exports = class DictionaryCommand extends Command {
if (!body.length) return msg.say('Could not find any results.');
const data = body[0];
const embed = new MessageEmbed()
.setColor(0x9797FF)
.setAuthor('Wordnik', 'https://i.imgur.com/VcLZLXn.jpg')
.setColor(0xFE6F11)
.setTitle(data.word)
.setDescription(`(${data.partOfSpeech}) ${data.text}`);
.setURL(`http://wordnik.com/words/${query}#define`)
.setDescription(`(${data.partOfSpeech || 'N/A'}) ${data.text}`);
return msg.embed(embed);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);