1
0
Fork 0

Despacito will now send random vid from randVid.json

Commando
Loïc Bersier 6 years ago
parent 3be13d9d03
commit 6af05bcc31

@ -1,4 +1,5 @@
const { Command } = require('discord.js-commando');
const responseObject = require("../../randVid.json");
module.exports = class DespacitoCommand extends Command {
constructor(client) {
super(client, {
@ -10,6 +11,8 @@ module.exports = class DespacitoCommand extends Command {
}
run(message) {
return message.say('https://www.youtube.com/watch?v=W3GrSMYbkBE');
}
const number = 2;
const vidNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
message.channel.send(responseObject[vidNumber]);
}
};

@ -0,0 +1,4 @@
{
"1": "https://twitter.com/i/status/1037932315727618048",
"2": "https://www.youtube.com/watch?v=W3GrSMYbkBE"
}
Loading…
Cancel
Save