3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-07 19:17:19 +00:00
zeppelin/backend/src/plugins/Spam/util/addRecentAction.ts
Dragory 45e3fe2ef0
chore: esm imports
This will make merging this into 'next' much easier.
2024-08-11 21:58:52 +03:00

14 lines
413 B
TypeScript

import { GuildPluginData } from "knub";
import { RecentActionType, SpamPluginType } from "../types.js";
export function addRecentAction(
pluginData: GuildPluginData<SpamPluginType>,
type: RecentActionType,
userId: string,
actionGroupId: string,
extraData: any,
timestamp: number,
count = 1,
) {
pluginData.state.recentActions.push({ type, userId, actionGroupId, extraData, timestamp, count });
}