Automod work
This commit is contained in:
parent
140ba84544
commit
f657b169df
32 changed files with 1099 additions and 5 deletions
9
backend/src/plugins/Automod/functions/findRecentSpam.ts
Normal file
9
backend/src/plugins/Automod/functions/findRecentSpam.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
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 && spam.userId === userId;
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue