mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
20 lines
533 B
JavaScript
20 lines
533 B
JavaScript
const Command = require('../../structures/Command');
|
|
const sides = ['heads', 'tails'];
|
|
|
|
module.exports = class CoinFlipCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'coin',
|
|
aliases: ['coin-flip', 'flip'],
|
|
group: 'random-res',
|
|
memberName: 'coin',
|
|
description: 'Flips a coin.'
|
|
});
|
|
}
|
|
|
|
run(msg) {
|
|
const side = sides[Math.floor(Math.random() * sides.length)];
|
|
return msg.say(`It landed on ${side}!`);
|
|
}
|
|
};
|