3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Update to new Knub 30 beta. Code clean-up.

This commit is contained in:
Dragory 2020-10-01 01:43:38 +03:00
parent 5d579446c5
commit 2f470dc37a
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
299 changed files with 1075 additions and 1004 deletions

View file

@ -1,14 +1,21 @@
import { SavedMessage } from "src/data/entities/SavedMessage";
import { SavedMessage } from "../../../data/entities/SavedMessage";
import { RecentActionType, SpamPluginType, TBaseSingleSpamConfig } from "../types";
import moment from "moment-timezone";
import { MuteResult } from "src/plugins/Mutes/types";
import { convertDelayStringToMS, DBDateFormat, noop, resolveMember, stripObjectToScalars, trimLines } from "src/utils";
import { LogType } from "src/data/LogType";
import { CaseTypes } from "src/data/CaseTypes";
import { logger } from "src/logger";
import { PluginData } from "knub";
import { MutesPlugin } from "src/plugins/Mutes/MutesPlugin";
import { CasesPlugin } from "src/plugins/Cases/CasesPlugin";
import { MuteResult } from "../../../plugins/Mutes/types";
import {
convertDelayStringToMS,
DBDateFormat,
noop,
resolveMember,
stripObjectToScalars,
trimLines,
} from "../../../utils";
import { LogType } from "../../../data/LogType";
import { CaseTypes } from "../../../data/CaseTypes";
import { logger } from "../../../logger";
import { GuildPluginData } from "knub";
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
import { addRecentAction } from "./addRecentAction";
import { getRecentActionCount } from "./getRecentActionCount";
import { getRecentActions } from "./getRecentActions";
@ -18,7 +25,7 @@ import { LogsPlugin } from "../../Logs/LogsPlugin";
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
export async function logAndDetectMessageSpam(
pluginData: PluginData<SpamPluginType>,
pluginData: GuildPluginData<SpamPluginType>,
savedMessage: SavedMessage,
type: RecentActionType,
spamConfig: TBaseSingleSpamConfig,