3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-24 10:05:03 +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,14 @@
import { PluginData } from "knub";
import { SpamPluginType, RecentActionType } from "../types";
export function addRecentAction(
pluginData: PluginData<SpamPluginType>,
type: RecentActionType,
userId: string,
actionGroupId: string,
extraData: any,
timestamp: number,
count = 1,
) {
pluginData.state.recentActions.push({ type, userId, actionGroupId, extraData, timestamp, count });
}