From 033dd7345b63c70c62d8e744c44d4fe5d90d320b Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 9 Sep 2018 16:28:02 +0200 Subject: [PATCH] Dont need to change manually the number of picture --- commands/fun/badmeme.js | 2 +- commands/fun/despacito.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/fun/badmeme.js b/commands/fun/badmeme.js index db8ed19a..6a9d6fe5 100644 --- a/commands/fun/badmeme.js +++ b/commands/fun/badmeme.js @@ -11,7 +11,7 @@ module.exports = class BadmemeCommand extends Command { } run(message) { - const number = 12; + const number = object.keys(responseObject).lenght; const picNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1; message.channel.send(`${picNumber}: ${responseObject[picNumber]}`); } diff --git a/commands/fun/despacito.js b/commands/fun/despacito.js index a2babc86..9aa035f4 100644 --- a/commands/fun/despacito.js +++ b/commands/fun/despacito.js @@ -11,7 +11,7 @@ module.exports = class DespacitoCommand extends Command { } run(message) { - const number = 5; + const number = object.keys(responseObject).lenght; const vidNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1; message.channel.send(`${vidNumber}: ${responseObject[vidNumber]}`); }