Despacito will now send random vid from randVid.json
This commit is contained in:
parent
3be13d9d03
commit
6af05bcc31
2 changed files with 9 additions and 2 deletions
|
@ -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]);
|
||||
}
|
||||
};
|
4
randVid.json
Normal file
4
randVid.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"1": "https://twitter.com/i/status/1037932315727618048",
|
||||
"2": "https://www.youtube.com/watch?v=W3GrSMYbkBE"
|
||||
}
|
Loading…
Reference in a new issue