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

Add time_and_date plugin. Use it for timezones and date formats around the bot.

This commit is contained in:
Dragory 2020-08-19 00:19:12 +03:00
parent cffb0dbd6b
commit 4ae8cf85a3
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
67 changed files with 543 additions and 177 deletions

View file

@ -2,7 +2,7 @@ import { SavedMessage } from "src/data/entities/SavedMessage";
import { RecentActionType, TBaseSingleSpamConfig, SpamPluginType } from "../types";
import moment from "moment-timezone";
import { MuteResult } from "src/plugins/Mutes/types";
import { convertDelayStringToMS, trimLines, stripObjectToScalars, resolveMember, noop } from "src/utils";
import { convertDelayStringToMS, trimLines, stripObjectToScalars, resolveMember, noop, DBDateFormat } from "src/utils";
import { LogType } from "src/data/LogType";
import { CaseTypes } from "src/data/CaseTypes";
import { logger } from "src/logger";
@ -14,7 +14,6 @@ import { getRecentActionCount } from "./getRecentActionCount";
import { getRecentActions } from "./getRecentActions";
import { clearRecentUserActions } from "./clearRecentUserActions";
import { saveSpamArchives } from "./saveSpamArchives";
import { DBDateFormat } from "../../../utils/dateFormats";
export async function logAndDetectMessageSpam(
pluginData: PluginData<SpamPluginType>,