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:
parent
4b33322127
commit
ef35f17eca
14 changed files with 622 additions and 0 deletions
14
backend/src/plugins/Spam/util/addRecentAction.ts
Normal file
14
backend/src/plugins/Spam/util/addRecentAction.ts
Normal 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 });
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue