automod: tweaks/fixes to spam detection
This commit is contained in:
parent
4931c95872
commit
80fb9d7b6b
7 changed files with 18 additions and 11 deletions
|
@ -2,8 +2,8 @@ import { PluginData } from "knub";
|
|||
import { AutomodPluginType } from "../types";
|
||||
import { RecentActionType } from "../constants";
|
||||
|
||||
export function findRecentSpam(pluginData: PluginData<AutomodPluginType>, type: RecentActionType, userId?: string) {
|
||||
export function findRecentSpam(pluginData: PluginData<AutomodPluginType>, type: RecentActionType, identifier?: string) {
|
||||
return pluginData.state.recentSpam.find(spam => {
|
||||
return spam.type === type && (!userId || spam.userIds.includes(userId));
|
||||
return spam.type === type && (!identifier || spam.identifiers.includes(identifier));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue