1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/commands/fun/despacito.js

18 lines
631 B
JavaScript

6 years ago
const { Command } = require('discord.js-commando');
6 years ago
const responseObject = require("../../json/despacito.json");
6 years ago
module.exports = class DespacitoCommand extends Command {
constructor(client) {
super(client, {
name: 'despacito',
group: 'fun',
memberName: 'despacito',
description: `despacito`,
6 years ago
});
}
6 years ago
async run(message) {
6 years ago
const number = Object.keys(responseObject).length;
const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
message.channel.send({files: [responseObject[despacitoNumber]]});
}
6 years ago
};