From 129196b290727e109415362e57c7f543b347fc9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Mon, 22 Aug 2016 22:12:31 +0200 Subject: [PATCH] Output what meme is sent --- dodsorfas/Skypebot/commands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dodsorfas/Skypebot/commands.js b/dodsorfas/Skypebot/commands.js index ca27975..3780b7b 100644 --- a/dodsorfas/Skypebot/commands.js +++ b/dodsorfas/Skypebot/commands.js @@ -58,7 +58,7 @@ exports.meme = function(session) { var file; var memewhitelist = fs.readdirSync("/usr/src/app/memes/"); if (session.message.text.match(helper.regex("meme random")) != null) { - var image = Math.floor(Math.random() * 9999999) % memewhitelist.length; + var image = Math.floor(Math.random() * 1000000) % memewhitelist.length; file=(memewhitelist[image]); } else { @@ -74,7 +74,7 @@ exports.meme = function(session) { contentType: "image/png", contentUrl: "http://dandellion.xyz/dodsorfas/memes/" + file }]); - + session.send("This meme is called: " + file); session.send(msg); }