2018-09-08 01:50:13 +02:00
|
|
|
const { Command } = require('discord.js-commando');
|
2018-10-06 13:24:14 +02:00
|
|
|
const responseObject = require("../../json/despacito.json");
|
2018-09-08 01:50:13 +02:00
|
|
|
module.exports = class DespacitoCommand extends Command {
|
|
|
|
constructor(client) {
|
|
|
|
super(client, {
|
|
|
|
name: 'despacito',
|
|
|
|
group: 'fun',
|
|
|
|
memberName: 'despacito',
|
2018-09-18 15:44:35 +02:00
|
|
|
description: `despacito`,
|
2018-09-08 01:50:13 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2018-09-09 21:32:08 +02:00
|
|
|
async run(message) {
|
2018-10-06 13:24:14 +02:00
|
|
|
const number = Object.keys(responseObject).length;
|
|
|
|
const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
|
|
|
message.channel.send({files: [responseObject[despacitoNumber]]});
|
2018-09-08 20:34:03 +02:00
|
|
|
}
|
2018-09-08 01:50:13 +02:00
|
|
|
};
|