3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-12 13:37:19 +00:00

Migrate Spam to new Plugin structure

This commit is contained in:
Dark 2020-07-26 16:05:49 +02:00
parent 4b33322127
commit ef35f17eca
14 changed files with 622 additions and 0 deletions

View file

@ -0,0 +1,17 @@
import { RecentActionType } from "../types";
export function getRecentActions(
pluginData,
type: RecentActionType,
userId: string,
actionGroupId: string,
since: number,
) {
return pluginData.state.recentActions.filter(action => {
if (action.timestamp < since) return false;
if (action.type !== type) return false;
if (action.actionGroupId !== actionGroupId) return false;
if (action.userId !== userId) return false;
return true;
});
}