Cat Facts, Dog Facts

This commit is contained in:
Daniel Odendahl Jr
2017-09-16 23:17:56 +00:00
parent 5d75d0bc65
commit 9fb792b8f7
6 changed files with 52 additions and 5 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ module.exports = class CatCommand extends Command {
try {
const { body } = await snekfetch
.get('http://random.cat/meow');
return msg.say(body.file);
return msg.say({ files: [body.file] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+2 -2
View File
@@ -14,8 +14,8 @@ module.exports = class DogCommand extends Command {
async run(msg) {
try {
const { body } = await snekfetch
.get('https://random.dog/woof.json');
return msg.say(body.url);
.get('https://dog.ceo/api/breeds/image/random');
return msg.say({ files: [body.message] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}