Browse Source

Revert "Fixed dev commands not being recognised outside of posting channel"

This reverts commit a8d3f04ad4.
shorten
benji7425 4 years ago
parent
commit
d9d4f18fa1
  1. 18
      feed-bot.js

18
feed-bot.js

@ -61,15 +61,15 @@ var DiscordClient = {
return url;
});
}
}
else {
//iterate over all of our message triggers to see if the message sent requires any action
for (var i = 0; i < DiscordClient.messageTriggers.length; i++) {
var messageTrigger = DiscordClient.messageTriggers[i];
if (message === messageTrigger.message) {
//check if its locked to a channel or to a specific user
if ((messageTrigger.channelID && messageTrigger.channelID === channelID) || (messageTrigger.userIDs && messageTrigger.userIDs.includes(userID)))
messageTrigger.action(user, userID, channelID, message);
else {
//iterate over all of our message triggers to see if the message sent requires any action
for (var i = 0; i < DiscordClient.messageTriggers.length; i++) {
var messageTrigger = DiscordClient.messageTriggers[i];
if (message === messageTrigger.message) {
//check if its locked to a channel or to a specific user
if ((messageTrigger.channelID && messageTrigger.channelID === channelID) || (messageTrigger.userIDs && messageTrigger.userIDs.includes(userID)))
messageTrigger.action(user, userID, channelID, message);
}
}
}
}

Loading…
Cancel
Save