Choose dont need to put manually the number again... hope it will work

Commando
unknown 6 years ago
parent 3d1353a797
commit 6e97735c0f

@ -11,7 +11,7 @@ module.exports = class BadmemeCommand extends Command {
}
run(message) {
const number = 17;
const number = Object.keys(responseObject).length;
const picNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
message.channel.send(`${picNumber}: ${responseObject[picNumber]}`);
}

@ -11,7 +11,7 @@ module.exports = class DespacitoCommand extends Command {
}
run(message) {
const number = 8;
const number = Object.keys(responseObject).length;
const vidNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
message.channel.send(`${vidNumber}: ${responseObject[vidNumber]}`);
}

Loading…
Cancel
Save