mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 15:57:54 +02:00
Cat Facts, Dog Facts
This commit is contained in:
@@ -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!`);
|
||||
}
|
||||
|
||||
@@ -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!`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user