diff --git a/commands/fun/despacito.js b/commands/fun/despacito.js index 1bec58b0..75555fec 100644 --- a/commands/fun/despacito.js +++ b/commands/fun/despacito.js @@ -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]); + } }; \ No newline at end of file diff --git a/randVid.json b/randVid.json new file mode 100644 index 00000000..8b4a6f1e --- /dev/null +++ b/randVid.json @@ -0,0 +1,4 @@ +{ + "1": "https://twitter.com/i/status/1037932315727618048", + "2": "https://www.youtube.com/watch?v=W3GrSMYbkBE" +} \ No newline at end of file