diff --git a/commands/fun/funfact.js b/commands/fun/funfact.js new file mode 100644 index 00000000..4317e9bd --- /dev/null +++ b/commands/fun/funfact.js @@ -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]}`); + } +}; \ No newline at end of file diff --git a/funfact.json b/funfact.json new file mode 100644 index 00000000..d4d78579 --- /dev/null +++ b/funfact.json @@ -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." +} \ No newline at end of file