Files
xiao/commands/response/8ball.js
T
Daniel Odendahl Jr 3bb21c2df0 Cleaner Looking args
2017-05-02 17:54:07 +00:00

27 lines
790 B
JavaScript

const { Command } = require('discord.js-commando');
const answers = require('./8ballanswers');
module.exports = class MagicBallCommand extends Command {
constructor(client) {
super(client, {
name: '8ball',
group: 'response',
memberName: '8ball',
description: 'Predicts your future.',
args: [
{
key: 'question',
prompt: 'What do you want to ask the 8 ball?',
type: 'string'
}
]
});
}
run(msg, args) {
const { question } = args;
const answer = answers[Math.floor(Math.random() * answers.length)];
return msg.say(`Question: ${question}\n:8ball: ${answer} :8ball:`);
}
};