3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 08:45:03 +00:00
zeppelin/backend/src/plugins/ModActions/functions/clearIgnoredEvents.ts
2021-04-02 23:19:38 -04:00

13 lines
402 B
TypeScript

import { GuildPluginData } from "knub";
import { IgnoredEventType, ModActionsPluginType } from "../types";
export function clearIgnoredEvents(
pluginData: GuildPluginData<ModActionsPluginType>,
type: IgnoredEventType,
userId: string,
) {
pluginData.state.ignoredEvents.splice(
pluginData.state.ignoredEvents.findIndex((info) => type === info.type && userId === info.userId),
1,
);
}