Haha-Yes/commands/fun/randocat.js

24 lines
690 B
JavaScript
Raw Normal View History

2018-09-26 13:47:21 +02:00
const { Command } = require('discord.js-commando');
const Discord = require('discord.js');
const snekfetch = require('snekfetch');
2018-09-26 13:48:54 +02:00
module.exports = class RandoCatCommand extends Command {
2018-09-26 13:47:21 +02:00
constructor(client) {
super(client, {
2018-09-26 13:48:54 +02:00
name: 'randocat',
2018-09-26 13:47:21 +02:00
group: 'fun',
2018-09-26 13:48:54 +02:00
memberName: 'randocat',
2018-09-26 13:47:21 +02:00
description: `Show a random cat`,
});
}
async run(message, { city }) {
const { body } = await snekfetch.get(`http://aws.random.cat/meow`);
const dogEmbed = new Discord.RichEmbed()
.setColor("#ff9900")
.setTitle('Meow')
.setImage(body.file)
message.say(dogEmbed);
}
};