Organise all imports, make Mutes depend on Logs
This commit is contained in:
parent
a94e7593ec
commit
6ac9d2f2a2
437 changed files with 1912 additions and 2027 deletions
|
@ -1,13 +1,13 @@
|
|||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { PluginOptions } from "knub";
|
||||
import { ConfigSchema, CensorPluginType } from "./types";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { CensorPluginType, ConfigSchema } from "./types";
|
||||
import { onMessageCreate } from "./util/onMessageCreate";
|
||||
import { onMessageUpdate } from "./util/onMessageUpdate";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
|
||||
const defaultOptions: PluginOptions<CensorPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType } from "knub";
|
||||
import { tNullable } from "../../utils";
|
||||
import { TRegex } from "../../validatorUtils";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { RegExpRunner } from "../../RegExpRunner";
|
||||
import { tNullable } from "../../utils";
|
||||
import { TRegex } from "../../validatorUtils";
|
||||
|
||||
export const ConfigSchema = t.type({
|
||||
filter_zalgo: t.boolean,
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { CensorPluginType } from "../types";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
|
||||
import { ZalgoRegex } from "../../../data/Zalgo";
|
||||
import { getInviteCodesInString, getUrlsInString, resolveMember, resolveInvite, isGuildInvite } from "../../../utils";
|
||||
import cloneDeep from "lodash.clonedeep";
|
||||
import { censorMessage } from "./censorMessage";
|
||||
import { Invite, MessageEmbed } from "discord.js";
|
||||
import escapeStringRegexp from "escape-string-regexp";
|
||||
import { logger } from "../../../logger";
|
||||
import { GuildPluginData } from "knub";
|
||||
import cloneDeep from "lodash.clonedeep";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { ZalgoRegex } from "../../../data/Zalgo";
|
||||
import { allowTimeout } from "../../../RegExpRunner";
|
||||
import { MessageEmbed, Invite } from "discord.js";
|
||||
import { getInviteCodesInString, getUrlsInString, isGuildInvite, resolveInvite, resolveMember } from "../../../utils";
|
||||
import { CensorPluginType } from "../types";
|
||||
import { censorMessage } from "./censorMessage";
|
||||
|
||||
|
||||
export async function applyFiltersToMsg(
|
||||
pluginData: GuildPluginData<CensorPluginType>,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { TextChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CensorPluginType } from "../types";
|
||||
import { deactivateMentions, disableCodeBlocks } from "knub/dist/helpers";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { stripObjectToScalars, resolveUser } from "../../../utils";
|
||||
import { disableCodeBlocks, deactivateMentions } from "knub/dist/helpers";
|
||||
import { TextChannel } from "discord.js";
|
||||
import { resolveUser, stripObjectToScalars } from "../../../utils";
|
||||
import { CensorPluginType } from "../types";
|
||||
|
||||
export async function censorMessage(
|
||||
pluginData: GuildPluginData<CensorPluginType>,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { CensorPluginType } from "../types";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { applyFiltersToMsg } from "./applyFiltersToMsg";
|
||||
import { messageLock } from "../../../utils/lockNameHelpers";
|
||||
import { CensorPluginType } from "../types";
|
||||
import { applyFiltersToMsg } from "./applyFiltersToMsg";
|
||||
|
||||
export async function onMessageCreate(pluginData: GuildPluginData<CensorPluginType>, savedMessage: SavedMessage) {
|
||||
if (savedMessage.is_bot) return;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { CensorPluginType } from "../types";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { applyFiltersToMsg } from "./applyFiltersToMsg";
|
||||
import { messageLock } from "../../../utils/lockNameHelpers";
|
||||
import { CensorPluginType } from "../types";
|
||||
import { applyFiltersToMsg } from "./applyFiltersToMsg";
|
||||
|
||||
export async function onMessageUpdate(pluginData: GuildPluginData<CensorPluginType>, savedMessage: SavedMessage) {
|
||||
if (savedMessage.is_bot) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue