mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
9 lines
385 B
TypeScript
9 lines
385 B
TypeScript
import { PluginData } from "knub";
|
|
import { AutomodPluginType } from "../types";
|
|
import { RecentActionType } from "../constants";
|
|
|
|
export function findRecentSpam(pluginData: PluginData<AutomodPluginType>, type: RecentActionType, userId?: string) {
|
|
return pluginData.state.recentSpam.find(spam => {
|
|
return spam.type === type && (!userId || spam.userIds.includes(userId));
|
|
});
|
|
}
|