Files
xiao/commands/response/roast.js
T
Daniel Odendahl Jr bc7153ec91 Remove Help Examples
2017-04-23 17:03:17 +00:00

31 lines
943 B
JavaScript

const { Command } = require('discord.js-commando');
const roasts = require('./roasts.json');
module.exports = class RoastCommand extends Command {
constructor(client) {
super(client, {
name: 'roast',
aliases: [
'burn'
],
group: 'response',
memberName: 'roast',
description: 'Roasts something/someone.',
args: [{
key: 'thing',
prompt: 'What do you want to roast?',
type: 'string'
}]
});
}
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
const { thing } = args;
const roast = roasts[Math.floor(Math.random() * roasts.length)];
return message.say(`${thing}, ${roast}`);
}
};