Files
xiao/commands/response/compliment.js
T
2017-05-11 02:38:36 +00:00

27 lines
805 B
JavaScript

const { Command } = require('discord.js-commando');
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}`);
}
};