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

29 lines
676 B
JavaScript

const Command = require('../../structures/Command');
const { stripIndents } = require('common-tags');
const answers = require('../../assets/json/8-ball');
module.exports = class MagicBallCommand extends Command {
constructor(client) {
super(client, {
name: '8-ball',
group: 'random-res',
memberName: '8-ball',
description: 'Asks your question to the Magic 8 Ball.',
args: [
{
key: 'question',
prompt: 'What do you want to ask the 8 ball?',
type: 'string'
}
]
});
}
run(msg, { question }) {
return msg.say(stripIndents`
Question: ${question}
🎱 ${answers[Math.floor(Math.random() * answers.length)]} 🎱
`);
}
};