forked from Supositware/Haha-Yes
Added fun fact
This commit is contained in:
parent
5609badbf6
commit
49224db7a7
2 changed files with 22 additions and 0 deletions
18
commands/fun/funfact.js
Normal file
18
commands/fun/funfact.js
Normal 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
4
funfact.json
Normal 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."
|
||||
}
|
Loading…
Reference in a new issue