2020-10-01 01:43:38 +03:00
|
|
|
import { GuildPluginData } from "knub";
|
2020-07-23 00:37:33 +03:00
|
|
|
import { IgnoredEventType, ModActionsPluginType } from "../types";
|
|
|
|
|
2020-10-01 01:43:38 +03:00
|
|
|
export function isEventIgnored(
|
|
|
|
pluginData: GuildPluginData<ModActionsPluginType>,
|
|
|
|
type: IgnoredEventType,
|
|
|
|
userId: string,
|
|
|
|
) {
|
2020-07-23 00:37:33 +03:00
|
|
|
return pluginData.state.ignoredEvents.some(info => type === info.type && userId === info.userId);
|
|
|
|
}
|