Files
xiao/commands/random-res/coin.js
T
Daniel Odendahl Jr 763f5d2c5e Fix all of these
2017-09-27 01:01:18 +00:00

19 lines
427 B
JavaScript

const Command = require('../../structures/Command');
const sides = ['heads', 'tails'];
module.exports = class CoinCommand extends Command {
constructor(client) {
super(client, {
name: 'coin',
aliases: ['coin-flip', 'flip'],
group: 'random-res',
memberName: 'coin',
description: 'Flips a coin.'
});
}
run(msg) {
return msg.say(`It landed on ${sides[Math.floor(Math.random() * sides.length)]}!`);
}
};