Browse Source

Fixed a couple more minor issues

shorten
benji7425 4 years ago
parent
commit
77514b08ba
  1. 4
      feed-bot.js

4
feed-bot.js

@ -89,7 +89,7 @@ var DiscordClient = {
var message = messageContents[messageIdx];
//test if the message contains a url
if (Links.regExp.test(message))
if (Links.messageContainsLink(message))
//detect the url inside the string, and cache it
Uri.withinString(message, function (url) {
Links.cache(url);
@ -126,7 +126,7 @@ var Links = {
},
messageContainsLink: function (message) {
var messageLower = message.toLowerCase();
return messageLower.includes("http") || messageLower.includes("https") || messageLower.includes("www");
return messageLower.includes("http://") || messageLower.includes("https://") || messageLower.includes("www.");
},
cached: [],
latestFromFeed: "",

Loading…
Cancel
Save