From 54638a2e7abe07bc61890173538c65b5e883e90c Mon Sep 17 00:00:00 2001 From: Ralph Date: Fri, 1 Jun 2018 14:40:19 -0400 Subject: [PATCH] Explicitly Declared Implicitly declared vars --- bot/modules/lbrylink.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bot/modules/lbrylink.js b/bot/modules/lbrylink.js index 998c330..578eb2a 100644 --- a/bot/modules/lbrylink.js +++ b/bot/modules/lbrylink.js @@ -11,7 +11,7 @@ exports.lbrylink = function(bot, msg, suffix) { } if (msg.content.includes('lbry://')) { //Extract URL from Message - newURL = msg.content + let newURL = msg.content .replace('lbry://', 'https://open.lbry.io/') .match(/\bhttps?:\/\/\S+/gi) .toString(); @@ -28,8 +28,8 @@ exports.lbrylink = function(bot, msg, suffix) { //Check if Username Was Supplied if (newURL.includes('>')) { //Get rid of ID from message - parseID = newURL.split('>').pop(); - newURL = 'https://open.lbry.io' + parseID; + let parseID = newURL.split('>').pop(); + let newURL = 'https://open.lbry.io' + parseID; if (responseDebug) { console.log('Username Provided!'); console.log('parseID = ' + parseID); @@ -45,8 +45,8 @@ exports.lbrylink = function(bot, msg, suffix) { //Also check obscurity in username like ``@MSFTserver` vs `@MSFTserverPics` if (parseID.includes('/')) { //parse out extra params before `/` like `<@123456789>Pics` - parseID = parseID.split('/').pop(); - newURL = 'https://open.lbry.io/' + parseID; + let parseID = parseID.split('/').pop(); + let newURL = 'https://open.lbry.io/' + parseID; if (responseDebug) { console.log('Username no / check'); console.log('parseID = ' + parseID);