Haha-Yes/commands/fun/badmeme.js

18 lines
573 B
JavaScript
Raw Normal View History

2018-09-07 22:48:15 +02:00
const { Command } = require('discord.js-commando');
2018-09-08 20:51:41 +02:00
const responseObject = require("../../randPic.json");
2018-09-07 22:48:15 +02:00
module.exports = class BadmemeCommand extends Command {
constructor(client) {
super(client, {
name: 'badmeme',
group: 'fun',
memberName: 'badmeme',
2018-09-08 21:45:09 +02:00
description: 'Send some very bad memes.',
2018-09-07 22:48:15 +02:00
});
}
run(message) {
2018-09-08 20:36:56 +02:00
const number = 12;
const picNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
message.channel.send(responseObject[picNumber]);
}
2018-09-07 22:48:15 +02:00
};