Files
xiao/commands/random/fun-fact.js
T
Daniel Odendahl Jr bb4c323bb7 Default functions
2017-11-28 17:17:40 +00:00

19 lines
439 B
JavaScript

const { Command } = require('discord.js-commando');
const facts = require('../../assets/json/fun-fact');
module.exports = class FunFactCommand extends Command {
constructor(client) {
super(client, {
name: 'fun-fact',
aliases: ['fact'],
group: 'random',
memberName: 'fun-fact',
description: 'Responds with a random fun fact.'
});
}
run(msg) {
return msg.say(facts[Math.floor(Math.random() * facts.length)]);
}
};