mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-24 01:55:03 +00:00
14 lines
410 B
TypeScript
14 lines
410 B
TypeScript
import { GuildPluginData } from "knub";
|
|
import { RecentActionType, SpamPluginType } from "../types";
|
|
|
|
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 });
|
|
}
|