Removed "link sent" detection when it sent it itself
This commit is contained in:
parent
8ea6a8169d
commit
2a1ced73cb
|
@ -52,8 +52,8 @@ Dns.resolve("discordapp.com", function (err) {
|
||||||
|
|
||||||
bot.on("message", function (user, userID, channelID, message) {
|
bot.on("message", function (user, userID, channelID, message) {
|
||||||
//check if the message is a link, cache it if it is
|
//check if the message is a link, cache it if it is
|
||||||
if (linkRegExp.test(message)) {
|
if (linkRegExp.test(message) && (message !== latestFeedLink)) {
|
||||||
logEvent("Detected user posted link: " + message);
|
logEvent("Detected posted link: " + message);
|
||||||
cacheLink(Uri.withinString(message, function (url) { return url; }));
|
cacheLink(Uri.withinString(message, function (url) { return url; }));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue