Added fun fact

This commit is contained in:
Loïc Bersier 2018-09-09 01:17:11 +02:00
parent 5609badbf6
commit 49224db7a7
2 changed files with 22 additions and 0 deletions

18
commands/fun/funfact.js Normal file
View file

@ -0,0 +1,18 @@
const { Command } = require('discord.js-commando');
const responseObject = require("../../funFact.json");
module.exports = class FunFactCommand extends Command {
constructor(client) {
super(client, {
name: 'funfact',
group: 'fun',
memberName: 'funfact',
description: 'Replies with a some fun fact.',
});
}
run(message) {
const number = 2;
const funFactNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
message.channel.send(`Fun fact: ${responseObject[funFactNumber]}`);
}
};

4
funfact.json Normal file
View file

@ -0,0 +1,4 @@
{
"1": "When i first did the badmeme command the bot used to stock the pic locally lole good thing i fixed after that.",
"2": "There is only 1 fun fact ( or 2 if you count that one ). If you want to see your own fun fact you can dm @Supositware | Baguette#82110."
}