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

Organise all imports, make Mutes depend on Logs

This commit is contained in:
Dark 2021-06-06 23:51:32 +02:00
parent a94e7593ec
commit 6ac9d2f2a2
No known key found for this signature in database
GPG key ID: 2CD6ACB6B0A87B8A
437 changed files with 1912 additions and 2027 deletions

View file

@ -1,7 +1,7 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { CountersPlugin } from "../../Counters/CountersPlugin";
import { LogType } from "../../../data/LogType";
import { CountersPlugin } from "../../Counters/CountersPlugin";
import { automodAction } from "../helpers";
export const AddToCounterAction = automodAction({
configType: t.type({

View file

@ -1,18 +1,18 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { LogType } from "../../../data/LogType";
import {
createChunkedMessage,
messageLink,
stripObjectToScalars,
tAllowedMentions,
tNormalizedNullOptional,
verboseChannelMention,
} from "../../../utils";
import { renderTemplate, TemplateParseError } from "../../../templateFormatter";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { TextChannel } from "discord.js";
import * as t from "io-ts";
import { erisAllowedMentionsToDjsMentionOptions } from "src/utils/erisAllowedMentionsToDjsMentionOptions";
import { LogType } from "../../../data/LogType";
import { renderTemplate, TemplateParseError } from "../../../templateFormatter";
import {
createChunkedMessage,
messageLink,
stripObjectToScalars,
tAllowedMentions,
tNormalizedNullOptional,
verboseChannelMention
} from "../../../utils";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { automodAction } from "../helpers";
export const AlertAction = automodAction({
configType: t.type({

View file

@ -1,20 +1,20 @@
import * as t from "io-ts";
import { CleanAction } from "./clean";
import { AutomodActionBlueprint } from "../helpers";
import { WarnAction } from "./warn";
import { MuteAction } from "./mute";
import { KickAction } from "./kick";
import { BanAction } from "./ban";
import { AlertAction } from "./alert";
import { ChangeNicknameAction } from "./changeNickname";
import { LogAction } from "./log";
import { AddRolesAction } from "./addRoles";
import { RemoveRolesAction } from "./removeRoles";
import { SetAntiraidLevelAction } from "./setAntiraidLevel";
import { ReplyAction } from "./reply";
import { AddToCounterAction } from "./addToCounter";
import { AlertAction } from "./alert";
import { BanAction } from "./ban";
import { ChangeNicknameAction } from "./changeNickname";
import { CleanAction } from "./clean";
import { KickAction } from "./kick";
import { LogAction } from "./log";
import { MuteAction } from "./mute";
import { RemoveRolesAction } from "./removeRoles";
import { ReplyAction } from "./reply";
import { SetAntiraidLevelAction } from "./setAntiraidLevel";
import { SetCounterAction } from "./setCounter";
import { SetSlowmodeAction } from "./setSlowmode";
import { WarnAction } from "./warn";
export const availableActions: Record<string, AutomodActionBlueprint<any>> = {
clean: CleanAction,

View file

@ -1,18 +1,16 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { LogType } from "../../../data/LogType";
import {
asyncMap,
convertDelayStringToMS,
nonNullish,
resolveMember,
tDelayString,
tNullable,
unique,
convertDelayStringToMS,
nonNullish,
tDelayString,
tNullable,
unique
} from "../../../utils";
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
import { CaseArgs } from "../../Cases/types";
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
import { automodAction } from "../helpers";
export const BanAction = automodAction({
configType: t.type({

View file

@ -1,8 +1,8 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { LogType } from "../../../data/LogType";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { nonNullish, unique } from "../../../utils";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { automodAction } from "../helpers";
export const ChangeNicknameAction = automodAction({
configType: t.union([

View file

@ -1,8 +1,8 @@
import { TextChannel } from "discord.js";
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { LogType } from "../../../data/LogType";
import { noop } from "../../../utils";
import { TextChannel } from "discord.js";
import { automodAction } from "../helpers";
export const CleanAction = automodAction({
configType: t.boolean,

View file

@ -1,10 +1,9 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { LogType } from "../../../data/LogType";
import { asyncMap, nonNullish, resolveMember, tNullable, unique } from "../../../utils";
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
import { CaseArgs } from "../../Cases/types";
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
import { automodAction } from "../helpers";
export const KickAction = automodAction({
configType: t.type({

View file

@ -1,8 +1,8 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { LogType } from "../../../data/LogType";
import { stripObjectToScalars, unique } from "../../../utils";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { automodAction } from "../helpers";
export const LogAction = automodAction({
configType: t.boolean,

View file

@ -1,21 +1,19 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { LogType } from "../../../data/LogType";
import {
asyncMap,
convertDelayStringToMS,
nonNullish,
resolveMember,
tDelayString,
tNullable,
unique,
} from "../../../utils";
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
import { MutesPlugin } from "../../Mutes/MutesPlugin";
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import {
convertDelayStringToMS,
nonNullish,
tDelayString,
tNullable,
unique
} from "../../../utils";
import { CaseArgs } from "../../Cases/types";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { MutesPlugin } from "../../Mutes/MutesPlugin";
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
import { automodAction } from "../helpers";
export const MuteAction = automodAction({
configType: t.type({

View file

@ -1,17 +1,15 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { LogType } from "../../../data/LogType";
import { asyncMap, nonNullish, resolveMember, tNullable, unique } from "../../../utils";
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
import { getMissingPermissions } from "../../../utils/getMissingPermissions";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { missingPermissionError } from "../../../utils/missingPermissionError";
import { canAssignRole } from "../../../utils/canAssignRole";
import { ignoreRoleChange } from "../functions/ignoredRoleChanges";
import { memberRolesLock } from "../../../utils/lockNameHelpers";
import { Permissions } from "discord.js";
import * as t from "io-ts";
import { LogType } from "../../../data/LogType";
import { nonNullish, unique } from "../../../utils";
import { canAssignRole } from "../../../utils/canAssignRole";
import { getMissingPermissions } from "../../../utils/getMissingPermissions";
import { memberRolesLock } from "../../../utils/lockNameHelpers";
import { missingPermissionError } from "../../../utils/missingPermissionError";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { ignoreRoleChange } from "../functions/ignoredRoleChanges";
import { automodAction } from "../helpers";
const p = Permissions.FLAGS;

View file

@ -1,23 +1,23 @@
import { MessageOptions, Permissions, TextChannel, User } from "discord.js";
import * as t from "io-ts";
import { automodAction } from "../helpers";
import {
convertDelayStringToMS,
noop,
renderRecursively,
StrictMessageContent,
stripObjectToScalars,
tDelayString,
tMessageContent,
tNullable,
unique,
verboseChannelMention,
} from "../../../utils";
import { AutomodContext } from "../types";
import { renderTemplate } from "../../../templateFormatter";
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
import { LogType } from "../../../data/LogType";
import { TextChannel, User, Constants, MessageOptions, Permissions } from "discord.js";
import { renderTemplate } from "../../../templateFormatter";
import {
convertDelayStringToMS,
noop,
renderRecursively,
stripObjectToScalars,
tDelayString,
tMessageContent,
tNullable,
unique,
verboseChannelMention
} from "../../../utils";
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
import { automodAction } from "../helpers";
import { AutomodContext } from "../types";
export const ReplyAction = automodAction({
configType: t.union([

View file

@ -1,7 +1,7 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { setAntiraidLevel } from "../functions/setAntiraidLevel";
import { tNullable } from "../../../utils";
import { setAntiraidLevel } from "../functions/setAntiraidLevel";
import { automodAction } from "../helpers";
export const SetAntiraidLevelAction = automodAction({
configType: tNullable(t.string),

View file

@ -1,7 +1,7 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { CountersPlugin } from "../../Counters/CountersPlugin";
import { LogType } from "../../../data/LogType";
import { CountersPlugin } from "../../Counters/CountersPlugin";
import { automodAction } from "../helpers";
export const SetCounterAction = automodAction({
configType: t.type({

View file

@ -1,9 +1,9 @@
import { TextChannel } from "discord.js";
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { convertDelayStringToMS, isDiscordRESTError, tDelayString, tNullable } from "../../../utils";
import { LogType } from "../../../data/LogType";
import { Constants, TextChannel } from "discord.js";
import { ChannelTypeStrings } from "src/types";
import { LogType } from "../../../data/LogType";
import { convertDelayStringToMS, isDiscordRESTError, tDelayString, tNullable } from "../../../utils";
import { automodAction } from "../helpers";
export const SetSlowmodeAction = automodAction({
configType: t.type({

View file

@ -1,10 +1,9 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
import { LogType } from "../../../data/LogType";
import { asyncMap, nonNullish, resolveMember, tNullable, unique } from "../../../utils";
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
import { CaseArgs } from "../../Cases/types";
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
import { automodAction } from "../helpers";
export const WarnAction = automodAction({
configType: t.type({