Files
xiao/commands/random-res/roast.js
T
Daniel Odendahl Jr 1c9ac56831 Change arg assignment
2017-09-16 01:44:44 +00:00

27 lines
592 B
JavaScript

const Command = require('../../structures/Command');
const roasts = require('../../assets/json/roast');
module.exports = class RoastCommand extends Command {
constructor(client) {
super(client, {
name: 'roast',
group: 'random-res',
memberName: 'roast',
description: 'Roasts a user.',
args: [
{
key: 'user',
prompt: 'What user do you want to roast?',
type: 'user',
default: ''
}
]
});
}
run(msg, { user }) {
if (!user) user = msg.author;
return msg.say(`${user.username}, ${roasts[Math.floor(Math.random() * roasts.length)]}`);
}
};