Files
xiao/commands/response/compliment.js
T
Daniel Odendahl Jr 7802bb49cb Clean-Ups
2017-05-31 04:41:01 +00:00

27 lines
806 B
JavaScript

const Command = require('../../structures/Command');
const compliments = require('../../assets/json/compliment');
module.exports = class ComplimentCommand extends Command {
constructor(client) {
super(client, {
name: 'compliment',
group: 'response',
memberName: 'compliment',
description: 'Compliments something/someone.',
args: [
{
key: 'thing',
prompt: 'What do you want to compliment?',
type: 'string'
}
]
});
}
run(msg, args) {
const { thing } = args;
const compliment = compliments[Math.floor(Math.random() * compliments.length)];
return msg.say(`${thing}, ${compliment}`);
}
};