Files
xiao/commands/response/fishy.js
T
2017-04-20 22:13:27 +00:00

28 lines
845 B
JavaScript

const { Command } = require('discord.js-commando');
const fishes = [':fish:', ':tropical_fish:', ':blowfish:'];
module.exports = class FishyCommand extends Command {
constructor(client) {
super(client, {
name: 'fishy',
aliases: [
'fishing',
'fish'
],
group: 'response',
memberName: 'fishy',
description: 'Catches a fish. (x;fishy)',
examples: ['x;fishy']
});
}
run(message) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
const fish = fishes[Math.floor(Math.random() * fishes.length)];
return message.say(`You caught a: ${fish}`);
}
};