Merge branch 'master' of github.com:Dragory/ZeppelinBot

This commit is contained in:
Dragory 2018-08-03 19:12:21 +03:00
commit aee14eac10

View file

@ -104,6 +104,7 @@ export class SpamPlugin extends Plugin {
if (action.timestamp < since) return false; if (action.timestamp < since) return false;
if (action.type !== type) return false; if (action.type !== type) return false;
if (action.channelId !== channelId) return false; if (action.channelId !== channelId) return false;
if (action.userId !== userId) return false;
return true; return true;
}); });
} }
@ -113,6 +114,7 @@ export class SpamPlugin extends Plugin {
if (action.timestamp < since) return count; if (action.timestamp < since) return count;
if (action.type !== type) return count; if (action.type !== type) return count;
if (action.channelId !== channelId) return count; if (action.channelId !== channelId) return count;
if (action.userId !== userId) return false;
return count + action.count; return count + action.count;
}, 0); }, 0);
} }