mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-14 21:31:50 +00:00
chore: prettier
This commit is contained in:
parent
111295361e
commit
16fa19d3e9
104 changed files with 141 additions and 141 deletions
|
@ -2,13 +2,13 @@ import { ApiPermissions } from "@shared/apiPermissions";
|
|||
import express, { Request, Response } from "express";
|
||||
import { YAMLException } from "js-yaml";
|
||||
import moment from "moment-timezone";
|
||||
import { Queue } from "../Queue";
|
||||
import { validateGuildConfig } from "../configValidator";
|
||||
import { AllowedGuilds } from "../data/AllowedGuilds";
|
||||
import { ApiAuditLog } from "../data/ApiAuditLog";
|
||||
import { AuditLogEventTypes } from "../data/apiAuditLogTypes";
|
||||
import { ApiPermissionAssignments, ApiPermissionTypes } from "../data/ApiPermissionAssignments";
|
||||
import { Configs } from "../data/Configs";
|
||||
import { Queue } from "../Queue";
|
||||
import { AuditLogEventTypes } from "../data/apiAuditLogTypes";
|
||||
import { isSnowflake } from "../utils";
|
||||
import { loadYamlSafely } from "../utils/loadYamlSafely";
|
||||
import { ObjectAliasError } from "../utils/validateNoObjectAliases";
|
||||
|
|
|
@ -2,8 +2,8 @@ import { ApiPermissions } from "@shared/apiPermissions";
|
|||
import express, { Request, Response } from "express";
|
||||
import moment from "moment-timezone";
|
||||
import { z } from "zod";
|
||||
import { Case } from "../../data/entities/Case";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { Case } from "../../data/entities/Case";
|
||||
import { MINUTES } from "../../utils";
|
||||
import { requireGuildPermission } from "../permissions";
|
||||
import { rateLimit } from "../rateLimits";
|
||||
|
|
|
@ -2,13 +2,13 @@ import { ApiPermissions } from "@shared/apiPermissions";
|
|||
import express, { Request, Response } from "express";
|
||||
import { YAMLException } from "js-yaml";
|
||||
import moment from "moment-timezone";
|
||||
import { Queue } from "../../Queue";
|
||||
import { validateGuildConfig } from "../../configValidator";
|
||||
import { AllowedGuilds } from "../../data/AllowedGuilds";
|
||||
import { ApiAuditLog } from "../../data/ApiAuditLog";
|
||||
import { AuditLogEventTypes } from "../../data/apiAuditLogTypes";
|
||||
import { ApiPermissionAssignments, ApiPermissionTypes } from "../../data/ApiPermissionAssignments";
|
||||
import { Configs } from "../../data/Configs";
|
||||
import { Queue } from "../../Queue";
|
||||
import { AuditLogEventTypes } from "../../data/apiAuditLogTypes";
|
||||
import { isSnowflake } from "../../utils";
|
||||
import { loadYamlSafely } from "../../utils/loadYamlSafely";
|
||||
import { ObjectAliasError } from "../../utils/validateNoObjectAliases";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { ConfigValidationError, PluginConfigManager } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { guildPlugins } from "./plugins/availablePlugins";
|
||||
import { ZeppelinPlugin } from "./plugins/ZeppelinPlugin";
|
||||
import { guildPlugins } from "./plugins/availablePlugins";
|
||||
import { PartialZeppelinGuildConfigSchema, ZeppelinGuildConfig } from "./types";
|
||||
import { decodeAndValidateStrict, StrictValidationError } from "./validatorUtils";
|
||||
import { StrictValidationError, decodeAndValidateStrict } from "./validatorUtils";
|
||||
|
||||
const pluginNameToPlugin = new Map<string, ZeppelinPlugin>();
|
||||
for (const plugin of guildPlugins) {
|
||||
|
|
|
@ -3,7 +3,7 @@ import { getRepository, Repository } from "typeorm";
|
|||
import { DBDateFormat } from "../utils";
|
||||
import { BaseRepository } from "./BaseRepository";
|
||||
import { connection } from "./db";
|
||||
import { ApiUserInfo as ApiUserInfoEntity, ApiUserInfoData } from "./entities/ApiUserInfo";
|
||||
import { ApiUserInfoData, ApiUserInfo as ApiUserInfoEntity } from "./entities/ApiUserInfo";
|
||||
|
||||
export class ApiUserInfo extends BaseRepository {
|
||||
private apiUserInfo: Repository<ApiUserInfoEntity>;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Guild, Snowflake } from "discord.js";
|
||||
import moment from "moment-timezone";
|
||||
import { isDefaultSticker } from "src/utils/isDefaultSticker";
|
||||
import { getRepository, Repository } from "typeorm";
|
||||
import { renderTemplate, TemplateSafeValueContainer } from "../templateFormatter";
|
||||
import { Repository, getRepository } from "typeorm";
|
||||
import { TemplateSafeValueContainer, renderTemplate } from "../templateFormatter";
|
||||
import { trimLines } from "../utils";
|
||||
import { decrypt, encrypt } from "../utils/crypt";
|
||||
import { channelToTemplateSafeChannel, guildToTemplateSafeGuild } from "../utils/templateSafeObjects";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { GuildChannel, Message } from "discord.js";
|
||||
import moment from "moment-timezone";
|
||||
import { getRepository, Repository } from "typeorm";
|
||||
import { Repository, getRepository } from "typeorm";
|
||||
import { QueuedEventEmitter } from "../QueuedEventEmitter";
|
||||
import { noop } from "../utils";
|
||||
import { asyncMap } from "../utils/async";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import path from "path";
|
||||
import { Connection, createConnection } from "typeorm";
|
||||
import { backendDir } from "../paths";
|
||||
import { SimpleError } from "../SimpleError";
|
||||
import { backendDir } from "../paths";
|
||||
import { QueryLogger } from "./queryLogger";
|
||||
|
||||
const ormconfigPath = path.join(backendDir, "ormconfig.js");
|
||||
|
|
|
@ -17,15 +17,15 @@ import {
|
|||
ConfigValidationError,
|
||||
ExtendedMatchParams,
|
||||
GuildPluginData,
|
||||
helpers,
|
||||
PluginOverrideCriteria,
|
||||
helpers,
|
||||
} from "knub";
|
||||
import { logger } from "./logger";
|
||||
import { isStaff } from "./staff";
|
||||
import { TZeppelinKnub } from "./types";
|
||||
import { errorMessage, successMessage, tNullable } from "./utils";
|
||||
import { Tail } from "./utils/typeUtils";
|
||||
import { parseIoTsSchema, StrictValidationError } from "./validatorUtils";
|
||||
import { StrictValidationError, parseIoTsSchema } from "./validatorUtils";
|
||||
|
||||
const { getMemberLevel } = helpers;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType } from "knub";
|
||||
import { SavedMessage } from "../../data/entities/SavedMessage";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { SavedMessage } from "../../data/entities/SavedMessage";
|
||||
import { MINUTES, tDelayString } from "../../utils";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub";
|
||||
import { AutoReaction } from "../../data/entities/AutoReaction";
|
||||
import { GuildAutoReactions } from "../../data/GuildAutoReactions";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { AutoReaction } from "../../data/entities/AutoReaction";
|
||||
|
||||
export const ConfigSchema = t.type({
|
||||
can_manage: t.boolean,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { PermissionsBitField, PermissionsString } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
|
||||
import { isValidSnowflake, noop, tNullable, tPartialDictionary } from "../../../utils";
|
||||
import {
|
||||
guildToTemplateSafeGuild,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { GuildTextBasedChannel, MessageCreateOptions, PermissionsBitField, Snowflake, User } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
|
||||
import {
|
||||
convertDelayStringToMS,
|
||||
noop,
|
||||
|
|
|
@ -6,8 +6,8 @@ import {
|
|||
ThreadChannel,
|
||||
} from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { convertDelayStringToMS, MINUTES, noop, tDelayString, tNullable } from "../../../utils";
|
||||
import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
|
||||
import { MINUTES, convertDelayStringToMS, noop, tDelayString, tNullable } from "../../../utils";
|
||||
import { savedMessageToTemplateSafeSavedMessage, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
import { automodAction } from "../helpers";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { getEmojiInString, getRoleMentions, getUrlsInString, getUserMentions } from "../../../utils";
|
||||
import { RecentActionType, RECENT_ACTION_EXPIRY_TIME } from "../constants";
|
||||
import { RECENT_ACTION_EXPIRY_TIME, RecentActionType } from "../constants";
|
||||
import { AutomodContext, AutomodPluginType } from "../types";
|
||||
|
||||
export function addRecentActionsFromMessage(pluginData: GuildPluginData<AutomodPluginType>, context: AutomodContext) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { disableUserNotificationStrings, UserNotificationMethod } from "../../../utils";
|
||||
import { UserNotificationMethod, disableUserNotificationStrings } from "../../../utils";
|
||||
import { AutomodPluginType } from "../types";
|
||||
|
||||
export function resolveActionContactMethods(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { escapeInlineCode } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { phishermanDomainIsSafe } from "../../../data/Phisherman";
|
||||
import { allowTimeout } from "../../../RegExpRunner";
|
||||
import { phishermanDomainIsSafe } from "../../../data/Phisherman";
|
||||
import { getUrlsInString, tNullable } from "../../../utils";
|
||||
import { mergeRegexes } from "../../../utils/mergeRegexes";
|
||||
import { mergeWordsIntoRegex } from "../../../utils/mergeWordsIntoRegex";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { escapeBold, User, type Snowflake } from "discord.js";
|
||||
import { User, escapeBold, type Snowflake } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { tNullable } from "../../../utils";
|
||||
import { automodTrigger } from "../helpers";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { escapeBold, User, type Snowflake } from "discord.js";
|
||||
import { User, escapeBold, type Snowflake } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { automodTrigger } from "../helpers";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { escapeBold, User, type Snowflake } from "discord.js";
|
||||
import { User, escapeBold, type Snowflake } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { automodTrigger } from "../helpers";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { escapeBold, User, type Snowflake } from "discord.js";
|
||||
import { User, escapeBold, type Snowflake } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { tNullable } from "../../../utils";
|
||||
import { automodTrigger } from "../helpers";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
import { GuildMember, GuildTextBasedChannel, PartialGuildMember, ThreadChannel, User } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { BasePluginType, CooldownManager } from "knub";
|
||||
import { SavedMessage } from "../../data/entities/SavedMessage";
|
||||
import { Queue } from "../../Queue";
|
||||
import { RegExpRunner } from "../../RegExpRunner";
|
||||
import { GuildAntiraidLevels } from "../../data/GuildAntiraidLevels";
|
||||
import { GuildArchives } from "../../data/GuildArchives";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { Queue } from "../../Queue";
|
||||
import { RegExpRunner } from "../../RegExpRunner";
|
||||
import { SavedMessage } from "../../data/entities/SavedMessage";
|
||||
import { tNullable } from "../../utils";
|
||||
import { CounterEvents } from "../Counters/types";
|
||||
import { ModActionsEvents, ModActionType } from "../ModActions/types";
|
||||
import { ModActionType, ModActionsEvents } from "../ModActions/types";
|
||||
import { MutesEvents } from "../Mutes/types";
|
||||
import { AvailableActions } from "./actions/availableActions";
|
||||
import { RecentActionType } from "./constants";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { resolveUser, UnknownUser } from "../../../utils";
|
||||
import { UnknownUser, resolveUser } from "../../../utils";
|
||||
import { CaseNoteArgs, CasesPluginType } from "../types";
|
||||
import { postCaseToCaseLogChannel } from "./postToCaseLogChannel";
|
||||
import { resolveCaseId } from "./resolveCaseId";
|
||||
|
|
|
@ -2,8 +2,8 @@ import { MessageCreateOptions, NewsChannel, RESTJSONErrorCodes, Snowflake, TextC
|
|||
import { GuildPluginData } from "knub";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { isDiscordAPIError } from "../../../utils";
|
||||
import { InternalPosterMessageResult } from "../../InternalPoster/functions/sendMessage";
|
||||
import { InternalPosterPlugin } from "../../InternalPoster/InternalPosterPlugin";
|
||||
import { InternalPosterMessageResult } from "../../InternalPoster/functions/sendMessage";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { CasesPluginType } from "../types";
|
||||
import { getCaseEmbed } from "./getCaseEmbed";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType } from "knub";
|
||||
import { RegExpRunner } from "../../RegExpRunner";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { RegExpRunner } from "../../RegExpRunner";
|
||||
import { tNullable } from "../../utils";
|
||||
import { TRegex } from "../../validatorUtils";
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ import { Embed, Invite } from "discord.js";
|
|||
import escapeStringRegexp from "escape-string-regexp";
|
||||
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 { ZalgoRegex } from "../../../data/Zalgo";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { getInviteCodesInString, getUrlsInString, isGuildInvite, resolveInvite, resolveMember } from "../../../utils";
|
||||
import { CensorPluginType } from "../types";
|
||||
import { censorMessage } from "./censorMessage";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildTextBasedChannel, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { resolveUser } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { CensorPluginType } from "../types";
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Snowflake } from "discord.js";
|
|||
import moment from "moment-timezone";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { isOwner, sendErrorMessage } from "../../../pluginUtils";
|
||||
import { confirm, noop, SECONDS } from "../../../utils";
|
||||
import { SECONDS, confirm, noop } from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { rehostAttachment } from "../rehostAttachment";
|
||||
import { channelArchiverCmd } from "../types";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { PermissionsBitField, Snowflake, StageChannel, TextChannel, VoiceChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { isDiscordAPIError, MINUTES } from "../../../utils";
|
||||
import { MINUTES, isDiscordAPIError } from "../../../utils";
|
||||
import { filterObject } from "../../../utils/filterObject";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { CompanionChannelsPluginType, TCompanionChannelOpts } from "../types";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ContextMenuCommandInteraction, TextChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { UtilityPlugin } from "../../../plugins/Utility/UtilityPlugin";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { UtilityPlugin } from "../../../plugins/Utility/UtilityPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { ContextMenuPluginType } from "../types";
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { ContextMenuCommandInteraction } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ModActionsPlugin } from "src/plugins/ModActions/ModActionsPlugin";
|
||||
import { canActOn } from "src/pluginUtils";
|
||||
import { ModActionsPlugin } from "src/plugins/ModActions/ModActionsPlugin";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { convertDelayStringToMS } from "../../../utils";
|
||||
import { CaseArgs } from "../../Cases/types";
|
||||
|
|
|
@ -3,7 +3,7 @@ import { guildPluginMessageCommand } from "knub";
|
|||
import { waitForReply } from "knub/helpers";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { resolveUser, UnknownUser } from "../../../utils";
|
||||
import { UnknownUser, resolveUser } from "../../../utils";
|
||||
import { changeCounterValue } from "../functions/changeCounterValue";
|
||||
import { CountersPluginType } from "../types";
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { guildPluginMessageCommand } from "knub";
|
|||
import { waitForReply } from "knub/helpers";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { resolveUser, UnknownUser } from "../../../utils";
|
||||
import { UnknownUser, resolveUser } from "../../../utils";
|
||||
import { setCounterValue } from "../functions/setCounterValue";
|
||||
import { CountersPluginType } from "../types";
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { guildPluginMessageCommand } from "knub";
|
|||
import { waitForReply } from "knub/helpers";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { resolveUser, UnknownUser } from "../../../utils";
|
||||
import { UnknownUser, resolveUser } from "../../../utils";
|
||||
import { setCounterValue } from "../functions/setCounterValue";
|
||||
import { CountersPluginType } from "../types";
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { EventEmitter } from "events";
|
||||
import * as t from "io-ts";
|
||||
import { BasePluginType } from "knub";
|
||||
import { CounterTrigger } from "../../data/entities/CounterTrigger";
|
||||
import { GuildCounters } from "../../data/GuildCounters";
|
||||
import { CounterTrigger } from "../../data/entities/CounterTrigger";
|
||||
import { tDelayString, tNullable } from "../../utils";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { guildPluginMessageCommand, parseSignature } from "knub";
|
|||
import { TSignature } from "knub-command-manager";
|
||||
import { commandTypes } from "../../commandTypes";
|
||||
import { makeIoTsConfigParser } from "../../pluginUtils";
|
||||
import { createTypedTemplateSafeValueContainer, TemplateSafeValueContainer } from "../../templateFormatter";
|
||||
import { TemplateSafeValueContainer, createTypedTemplateSafeValueContainer } from "../../templateFormatter";
|
||||
import { UnknownUser } from "../../utils";
|
||||
import { isScalar } from "../../utils/isScalar";
|
||||
import {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Snowflake, TextChannel } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
|
||||
import { ActionError } from "../ActionError";
|
||||
import { CustomEventsPluginType } from "../types";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Snowflake, VoiceChannel } from "discord.js";
|
|||
import * as t from "io-ts";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
|
||||
import { resolveMember } from "../../../utils";
|
||||
import { ActionError } from "../ActionError";
|
||||
import { CustomEventsPluginType, TCustomEvent } from "../types";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { PluginOptions } from "knub";
|
||||
import { Queue } from "../../Queue";
|
||||
import { Webhooks } from "../../data/Webhooks";
|
||||
import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils";
|
||||
import { Queue } from "../../Queue";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { editMessage } from "./functions/editMessage";
|
||||
import { sendMessage } from "./functions/sendMessage";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { WebhookClient } from "discord.js";
|
||||
import * as t from "io-ts";
|
||||
import { BasePluginType } from "knub";
|
||||
import { Webhooks } from "../../data/Webhooks";
|
||||
import { Queue } from "../../Queue";
|
||||
import { Webhooks } from "../../data/Webhooks";
|
||||
|
||||
export const ConfigSchema = t.type({});
|
||||
export type TConfigSchema = t.TypeOf<typeof ConfigSchema>;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { caseToTemplateSafeCase, memberToTemplateSafeMember } from "../../../utils/templateSafeObjects";
|
||||
import { LogsPluginType } from "../types";
|
||||
|
|
|
@ -2,8 +2,8 @@ import { GuildTextBasedChannel, User } from "discord.js";
|
|||
import { GuildPluginData } from "knub";
|
||||
import { deactivateMentions, disableCodeBlocks } from "knub/helpers";
|
||||
import { resolveChannelIds } from "src/utils/resolveChannelIds";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { UnknownUser } from "../../../utils";
|
||||
import {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { GuildTextBasedChannel, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { ISavedMessageAttachmentData, SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { ISavedMessageAttachmentData, SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { UnknownUser, useMediaUrls } from "../../../utils";
|
||||
import { resolveChannelIds } from "../../../utils/resolveChannelIds";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildBasedChannel, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { UnknownUser } from "../../../utils";
|
||||
import { resolveChannelIds } from "../../../utils/resolveChannelIds";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildTextBasedChannel, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { UnknownUser } from "../../../utils";
|
||||
import { resolveChannelIds } from "../../../utils/resolveChannelIds";
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, CooldownManager, guildPluginEventListener } from "knub";
|
||||
import { z } from "zod";
|
||||
import { RegExpRunner } from "../../RegExpRunner";
|
||||
import { GuildArchives } from "../../data/GuildArchives";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { LogType } from "../../data/LogType";
|
||||
import { RegExpRunner } from "../../RegExpRunner";
|
||||
import { tMessageContent, tNullable } from "../../utils";
|
||||
import { MessageBuffer } from "../../utils/MessageBuffer";
|
||||
import {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { APIEmbed, MessageMentionTypes, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { allowTimeout } from "../../../RegExpRunner";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { TypedTemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { isDiscordAPIError, MINUTES } from "../../../utils";
|
||||
import { MINUTES, isDiscordAPIError } from "../../../utils";
|
||||
import { MessageBuffer } from "../../../utils/MessageBuffer";
|
||||
import { InternalPosterPlugin } from "../../InternalPoster/InternalPosterPlugin";
|
||||
import { ILogTypeData, LogsPluginType, TLogChannel, TLogChannelMap } from "../types";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { resolveUser } from "../../../utils";
|
||||
import { logMessageDelete } from "../logFunctions/logMessageDelete";
|
||||
import { logMessageDeleteBare } from "../logFunctions/logMessageDeleteBare";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { getBaseUrl } from "../../../pluginUtils";
|
||||
import { logMessageDeleteBulk } from "../logFunctions/logMessageDeleteBulk";
|
||||
import { LogsPluginType } from "../types";
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { GuildMember, Message, Snowflake } from "discord.js";
|
||||
import { EventEmitter } from "events";
|
||||
import { Queue } from "../../Queue";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { onGuildEvent } from "../../data/GuildEvents";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildMutes } from "../../data/GuildMutes";
|
||||
import { GuildTempbans } from "../../data/GuildTempbans";
|
||||
import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils";
|
||||
import { Queue } from "../../Queue";
|
||||
import { MINUTES, trimPluginDescription } from "../../utils";
|
||||
import { CasesPlugin } from "../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
|
@ -25,8 +25,8 @@ import { ForceUnmuteCmd } from "./commands/ForceunmuteCmd";
|
|||
import { HideCaseCmd } from "./commands/HideCaseCmd";
|
||||
import { KickCmd } from "./commands/KickCmd";
|
||||
import { MassbanCmd } from "./commands/MassBanCmd";
|
||||
import { MassmuteCmd } from "./commands/MassmuteCmd";
|
||||
import { MassunbanCmd } from "./commands/MassUnbanCmd";
|
||||
import { MassmuteCmd } from "./commands/MassmuteCmd";
|
||||
import { MuteCmd } from "./commands/MuteCmd";
|
||||
import { NoteCmd } from "./commands/NoteCmd";
|
||||
import { SoftbanCmd } from "./commands/SoftbanCommand";
|
||||
|
|
|
@ -3,8 +3,8 @@ import { getMemberLevel } from "knub/helpers";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { clearExpiringTempban, registerExpiringTempban } from "../../../data/loops/expiringTempbansLoop";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { canActOn, hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { resolveMember, resolveUser } from "../../../utils";
|
||||
import { banLock } from "../../../utils/lockNameHelpers";
|
||||
import { waitForButtonConfirm } from "../../../utils/waitForInteraction";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { APIEmbed, User } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { chunkArray, emptyEmbedValue, resolveUser, trimLines, UnknownUser } from "../../../utils";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { UnknownUser, chunkArray, emptyEmbedValue, resolveUser, trimLines } from "../../../utils";
|
||||
import { asyncMap } from "../../../utils/async";
|
||||
import { getChunkedEmbedFields } from "../../../utils/getChunkedEmbedFields";
|
||||
import { getGuildPrefix } from "../../../utils/getGuildPrefix";
|
||||
|
|
|
@ -2,8 +2,8 @@ import { Snowflake } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { canActOn, hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { DAYS, MINUTES, resolveMember, resolveUser } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
|
||||
|
|
|
@ -5,9 +5,9 @@ import { commandTypeHelpers as ct } from "../../../commandTypes";
|
|||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { humanizeDurationShort } from "../../../humanizeDurationShort";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { DAYS, MINUTES, noop, SECONDS } from "../../../utils";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { DAYS, MINUTES, SECONDS, noop } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
|
||||
import { ignoreEvent } from "../functions/ignoreEvent";
|
||||
|
|
|
@ -3,8 +3,8 @@ import { waitForReply } from "knub/helpers";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { logger } from "../../../logger";
|
||||
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
|
||||
import { modActionsCmd } from "../types";
|
||||
|
|
|
@ -3,8 +3,8 @@ import { commandTypeHelpers as ct } from "../../../commandTypes";
|
|||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { clearExpiringTempban } from "../../../data/loops/expiringTempbansLoop";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { resolveUser } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { AuditLogEvent, User } from "discord.js";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { resolveUser, UnknownUser } from "../../../utils";
|
||||
import { UnknownUser, resolveUser } from "../../../utils";
|
||||
import { findMatchingAuditLogEntry } from "../../../utils/findMatchingAuditLogEntry";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
|
|
|
@ -2,7 +2,7 @@ import { AuditLogEvent, User } from "discord.js";
|
|||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { logger } from "../../../logger";
|
||||
import { resolveUser, UnknownUser } from "../../../utils";
|
||||
import { UnknownUser, resolveUser } from "../../../utils";
|
||||
import { findMatchingAuditLogEntry } from "../../../utils/findMatchingAuditLogEntry";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { AuditLogEvent, User } from "discord.js";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { resolveUser, UnknownUser } from "../../../utils";
|
||||
import { UnknownUser, resolveUser } from "../../../utils";
|
||||
import { findMatchingAuditLogEntry } from "../../../utils/findMatchingAuditLogEntry";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
|
|
|
@ -3,7 +3,7 @@ import { GuildPluginData } from "knub";
|
|||
import { hasPermission } from "knub/helpers";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { DAYS, errorMessage, resolveMember, resolveUser, SECONDS } from "../../../utils";
|
||||
import { DAYS, SECONDS, errorMessage, resolveMember, resolveUser } from "../../../utils";
|
||||
import { IgnoredEventType, ModActionsPluginType } from "../types";
|
||||
import { formatReasonWithAttachments } from "./formatReasonWithAttachments";
|
||||
import { ignoreEvent } from "./ignoreEvent";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { GuildMember, GuildTextBasedChannel, Message, User } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { logger } from "../../../logger";
|
||||
import { hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { asSingleLine, isDiscordAPIError, UnknownUser } from "../../../utils";
|
||||
import { UnknownUser, asSingleLine, isDiscordAPIError } from "../../../utils";
|
||||
import { MutesPlugin } from "../../Mutes/MutesPlugin";
|
||||
import { MuteResult } from "../../Mutes/types";
|
||||
import { ModActionsPluginType } from "../types";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { GuildMember, Message, User } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
||||
import { hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { asSingleLine, UnknownUser } from "../../../utils";
|
||||
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
||||
import { UnknownUser, asSingleLine } from "../../../utils";
|
||||
import { ModActionsPluginType } from "../types";
|
||||
import { formatReasonWithAttachments } from "./formatReasonWithAttachments";
|
||||
|
||||
|
|
|
@ -5,16 +5,16 @@ import { CaseTypes } from "../../../data/CaseTypes";
|
|||
import { LogType } from "../../../data/LogType";
|
||||
import { registerExpiringTempban } from "../../../data/loops/expiringTempbansLoop";
|
||||
import { logger } from "../../../logger";
|
||||
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
|
||||
import {
|
||||
createUserNotificationError,
|
||||
DAYS,
|
||||
SECONDS,
|
||||
UserNotificationResult,
|
||||
createUserNotificationError,
|
||||
notifyUser,
|
||||
resolveMember,
|
||||
resolveUser,
|
||||
SECONDS,
|
||||
ucfirst,
|
||||
UserNotificationResult,
|
||||
} from "../../../utils";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { PermissionsBitField, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { isDiscordAPIError, isDiscordHTTPError, SECONDS, sleep } from "../../../utils";
|
||||
import { SECONDS, isDiscordAPIError, isDiscordHTTPError, sleep } from "../../../utils";
|
||||
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { ModActionsPluginType } from "../types";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Message } from "discord.js";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { formatReasonWithAttachments } from "./formatReasonWithAttachments";
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { GuildMember, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { createUserNotificationError, notifyUser, resolveUser, ucfirst, UserNotificationResult } from "../../../utils";
|
||||
import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
|
||||
import { UserNotificationResult, createUserNotificationError, notifyUser, resolveUser, ucfirst } from "../../../utils";
|
||||
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
import { waitForButtonConfirm } from "../../../utils/waitForInteraction";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
|
|
|
@ -2,13 +2,13 @@ import { GuildTextBasedChannel } from "discord.js";
|
|||
import { EventEmitter } from "events";
|
||||
import * as t from "io-ts";
|
||||
import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub";
|
||||
import { Case } from "../../data/entities/Case";
|
||||
import { Queue } from "../../Queue";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildMutes } from "../../data/GuildMutes";
|
||||
import { GuildTempbans } from "../../data/GuildTempbans";
|
||||
import { Queue } from "../../Queue";
|
||||
import { tNullable, UserNotificationMethod, UserNotificationResult } from "../../utils";
|
||||
import { Case } from "../../data/entities/Case";
|
||||
import { UserNotificationMethod, UserNotificationResult, tNullable } from "../../utils";
|
||||
import { CaseArgs } from "../Cases/types";
|
||||
|
||||
export const ConfigSchema = t.type({
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { PermissionFlagsBits } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { Mute } from "../../../data/entities/Mute";
|
||||
import { MAX_TIMEOUT_DURATION } from "../../../data/Mutes";
|
||||
import { Mute } from "../../../data/entities/Mute";
|
||||
import { DBDateFormat, resolveMember } from "../../../utils";
|
||||
import { MutesPluginType } from "../types";
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ import { Snowflake } from "discord.js";
|
|||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { Mute } from "../../../data/entities/Mute";
|
||||
import { AddMuteParams } from "../../../data/GuildMutes";
|
||||
import { MuteTypes } from "../../../data/MuteTypes";
|
||||
import { Mute } from "../../../data/entities/Mute";
|
||||
import { resolveMember, resolveUser } from "../../../utils";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { CaseArgs } from "../../Cases/types";
|
||||
|
|
|
@ -2,13 +2,13 @@ import { GuildMember } from "discord.js";
|
|||
import { EventEmitter } from "events";
|
||||
import * as t from "io-ts";
|
||||
import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub";
|
||||
import { Case } from "../../data/entities/Case";
|
||||
import { Mute } from "../../data/entities/Mute";
|
||||
import { GuildArchives } from "../../data/GuildArchives";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildMutes } from "../../data/GuildMutes";
|
||||
import { tNullable, UserNotificationMethod, UserNotificationResult } from "../../utils";
|
||||
import { Case } from "../../data/entities/Case";
|
||||
import { Mute } from "../../data/entities/Mute";
|
||||
import { UserNotificationMethod, UserNotificationResult, tNullable } from "../../utils";
|
||||
import { CaseArgs } from "../Cases/types";
|
||||
|
||||
export const ConfigSchema = t.type({
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { PluginOptions } from "knub";
|
||||
import { Queue } from "../../Queue";
|
||||
import { GuildNicknameHistory } from "../../data/GuildNicknameHistory";
|
||||
import { UsernameHistory } from "../../data/UsernameHistory";
|
||||
import { makeIoTsConfigParser } from "../../pluginUtils";
|
||||
import { Queue } from "../../Queue";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { NamesCmd } from "./commands/NamesCmd";
|
||||
import { ConfigSchema, NameHistoryPluginType } from "./types";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Snowflake } from "discord.js";
|
||||
import { createChunkedMessage, disableCodeBlocks } from "knub/helpers";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { NICKNAME_RETENTION_PERIOD } from "../../../data/cleanup/nicknames";
|
||||
import { MAX_NICKNAME_ENTRIES_PER_USER } from "../../../data/GuildNicknameHistory";
|
||||
import { MAX_USERNAME_ENTRIES_PER_USER } from "../../../data/UsernameHistory";
|
||||
import { NICKNAME_RETENTION_PERIOD } from "../../../data/cleanup/nicknames";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { DAYS } from "../../../utils";
|
||||
import { nameHistoryCmd } from "../types";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub";
|
||||
import { Queue } from "../../Queue";
|
||||
import { GuildNicknameHistory } from "../../data/GuildNicknameHistory";
|
||||
import { UsernameHistory } from "../../data/UsernameHistory";
|
||||
import { Queue } from "../../Queue";
|
||||
|
||||
export const ConfigSchema = t.type({
|
||||
can_view: t.boolean,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub";
|
||||
import { PingableRole } from "../../data/entities/PingableRole";
|
||||
import { GuildPingableRoles } from "../../data/GuildPingableRoles";
|
||||
import { PingableRole } from "../../data/entities/PingableRole";
|
||||
|
||||
export const ConfigSchema = t.type({
|
||||
can_manage: t.boolean,
|
||||
|
|
|
@ -4,7 +4,7 @@ import { GuildPluginData } from "knub";
|
|||
import moment from "moment-timezone";
|
||||
import { registerUpcomingScheduledPost } from "../../../data/loops/upcomingScheduledPostsLoop";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { DBDateFormat, errorMessage, MINUTES, StrictMessageContent } from "../../../utils";
|
||||
import { DBDateFormat, MINUTES, StrictMessageContent, errorMessage } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { PostPluginType } from "../types";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { PluginOptions } from "knub";
|
||||
import { Queue } from "../../Queue";
|
||||
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { makeIoTsConfigParser } from "../../pluginUtils";
|
||||
import { Queue } from "../../Queue";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { ClearReactionRolesCmd } from "./commands/ClearReactionRolesCmd";
|
||||
|
|
|
@ -3,7 +3,7 @@ import { commandTypeHelpers as ct } from "../../../commandTypes";
|
|||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { canUseEmoji, isDiscordAPIError, isValidEmoji, noop, trimPluginDescription } from "../../../utils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { reactionRolesCmd, TReactionRolePair } from "../types";
|
||||
import { TReactionRolePair, reactionRolesCmd } from "../types";
|
||||
import { applyReactionRoleReactionsToMessage } from "../util/applyReactionRoleReactionsToMessage";
|
||||
|
||||
const CLEAR_ROLES_EMOJI = "❌";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub";
|
||||
import { Queue } from "../../Queue";
|
||||
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { Queue } from "../../Queue";
|
||||
import { tNullable } from "../../utils";
|
||||
|
||||
export const ConfigSchema = t.type({
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js";
|
||||
import { buildCustomId } from "../../../utils/buildCustomId";
|
||||
import { TRoleButtonsConfigItem } from "../types";
|
||||
import { convertButtonStyleStringToEnum } from "./convertButtonStyleStringToEnum.js";
|
||||
import { TooManyComponentsError } from "./TooManyComponentsError";
|
||||
import { convertButtonStyleStringToEnum } from "./convertButtonStyleStringToEnum.js";
|
||||
|
||||
export function createButtonComponents(configItem: TRoleButtonsConfigItem): Array<ActionRowBuilder<ButtonBuilder>> {
|
||||
const rows: Array<ActionRowBuilder<ButtonBuilder>> = [];
|
||||
|
|
|
@ -5,7 +5,7 @@ import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
|||
import { RoleAddCmd } from "./commands/RoleAddCmd";
|
||||
import { RoleHelpCmd } from "./commands/RoleHelpCmd";
|
||||
import { RoleRemoveCmd } from "./commands/RoleRemoveCmd";
|
||||
import { ConfigSchema, defaultSelfGrantableRoleEntry, SelfGrantableRolesPluginType } from "./types";
|
||||
import { ConfigSchema, SelfGrantableRolesPluginType, defaultSelfGrantableRoleEntry } from "./types";
|
||||
|
||||
const defaultOptions: PluginOptions<SelfGrantableRolesPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub";
|
||||
import { SlowmodeChannel } from "../../data/entities/SlowmodeChannel";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { GuildSlowmodes } from "../../data/GuildSlowmodes";
|
||||
import { SlowmodeChannel } from "../../data/entities/SlowmodeChannel";
|
||||
|
||||
export const ConfigSchema = t.type({
|
||||
use_native_slowmode: t.boolean,
|
||||
|
|
|
@ -2,7 +2,7 @@ import { GuildTextBasedChannel, Snowflake } from "discord.js";
|
|||
import { GuildPluginData } from "knub";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { logger } from "../../../logger";
|
||||
import { isDiscordAPIError, UnknownUser, verboseChannelMention, verboseUserMention } from "../../../utils";
|
||||
import { UnknownUser, isDiscordAPIError, verboseChannelMention, verboseUserMention } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { SlowmodePluginType } from "../types";
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { GuildTextBasedChannel, Snowflake, TextChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { logger } from "../../../logger";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
||||
import { MuteResult } from "../../../plugins/Mutes/types";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { convertDelayStringToMS, DBDateFormat, noop, resolveMember, trimLines } from "../../../utils";
|
||||
import { DBDateFormat, convertDelayStringToMS, noop, resolveMember, trimLines } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RecentActionType, SpamPluginType, TBaseSingleSpamConfig } from "../types";
|
||||
import { addRecentAction } from "./addRecentAction";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { convertDelayStringToMS, resolveMember } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RecentActionType, SpamPluginType } from "../types";
|
||||
|
|
|
@ -8,7 +8,7 @@ import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
|||
import { MigratePinsCmd } from "./commands/MigratePinsCmd";
|
||||
import { StarboardReactionAddEvt } from "./events/StarboardReactionAddEvt";
|
||||
import { StarboardReactionRemoveAllEvt, StarboardReactionRemoveEvt } from "./events/StarboardReactionRemoveEvts";
|
||||
import { ConfigSchema, defaultStarboardOpts, StarboardPluginType } from "./types";
|
||||
import { ConfigSchema, StarboardPluginType, defaultStarboardOpts } from "./types";
|
||||
import { onMessageDelete } from "./util/onMessageDelete";
|
||||
|
||||
const defaultOptions: PluginOptions<StarboardPluginType> = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { GuildChannel, Message } from "discord.js";
|
||||
import path from "path";
|
||||
import { EmbedWith, EMPTY_CHAR } from "../../../utils";
|
||||
import { EMPTY_CHAR, EmbedWith } from "../../../utils";
|
||||
|
||||
const imageAttachmentExtensions = ["jpeg", "jpg", "png", "gif", "webp"];
|
||||
const audioAttachmentExtensions = ["wav", "mp3", "m4a"];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { parseTemplate, TemplateParseError } from "../../../templateFormatter";
|
||||
import { TemplateParseError, parseTemplate } from "../../../templateFormatter";
|
||||
import { tagsCmd } from "../types";
|
||||
|
||||
export const TagCreateCmd = tagsCmd({
|
||||
|
|
|
@ -2,7 +2,7 @@ import { GuildMember } from "discord.js";
|
|||
import escapeStringRegexp from "escape-string-regexp";
|
||||
import { ExtendedMatchParams, GuildPluginData } from "knub";
|
||||
import { StrictMessageContent } from "../../../utils";
|
||||
import { TagsPluginType, TTagCategory } from "../types";
|
||||
import { TTagCategory, TagsPluginType } from "../types";
|
||||
import { renderTagFromString } from "./renderTagFromString";
|
||||
|
||||
interface BaseResult {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ExtendedMatchParams, GuildPluginData } from "knub";
|
||||
import { renderTemplate, TemplateSafeValue, TemplateSafeValueContainer } from "../../../templateFormatter";
|
||||
import { renderRecursively, StrictMessageContent } from "../../../utils";
|
||||
import { TagsPluginType, TTag } from "../types";
|
||||
import { TemplateSafeValue, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
|
||||
import { StrictMessageContent, renderRecursively } from "../../../utils";
|
||||
import { TTag, TagsPluginType } from "../types";
|
||||
import { findTagByName } from "./findTagByName";
|
||||
|
||||
const MAX_TAG_FN_CALLS = 25;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { TemplateParseError } from "../../../templateFormatter";
|
|||
import { StrictMessageContent, validateAndParseMessageContent } from "../../../utils";
|
||||
import { memberToTemplateSafeMember, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { TagsPluginType, TTag } from "../types";
|
||||
import { TTag, TagsPluginType } from "../types";
|
||||
import { renderTagBody } from "./renderTagBody";
|
||||
|
||||
export async function renderTagFromString(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as t from "io-ts";
|
||||
import { Queue } from "../../Queue";
|
||||
import { UsernameHistory } from "../../data/UsernameHistory";
|
||||
import { makeIoTsConfigParser } from "../../pluginUtils";
|
||||
import { Queue } from "../../Queue";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { MessageCreateUpdateUsernameEvt, VoiceChannelJoinUpdateUsernameEvt } from "./events/UpdateUsernameEvts";
|
||||
import { UsernameSaverPluginType } from "./types";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { BasePluginType, guildPluginEventListener } from "knub";
|
||||
import { UsernameHistory } from "../../data/UsernameHistory";
|
||||
import { Queue } from "../../Queue";
|
||||
import { UsernameHistory } from "../../data/UsernameHistory";
|
||||
|
||||
export interface UsernameSaverPluginType extends BasePluginType {
|
||||
state: {
|
||||
|
|
|
@ -15,7 +15,7 @@ import { AboutCmd } from "./commands/AboutCmd";
|
|||
import { AvatarCmd } from "./commands/AvatarCmd";
|
||||
import { BanSearchCmd } from "./commands/BanSearchCmd";
|
||||
import { ChannelInfoCmd } from "./commands/ChannelInfoCmd";
|
||||
import { CleanArgs, cleanCmd, CleanCmd } from "./commands/CleanCmd";
|
||||
import { CleanArgs, CleanCmd, cleanCmd } from "./commands/CleanCmd";
|
||||
import { ContextCmd } from "./commands/ContextCmd";
|
||||
import { EmojiInfoCmd } from "./commands/EmojiInfoCmd";
|
||||
import { HelpCmd } from "./commands/HelpCmd";
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { Message, Snowflake, TextChannel, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { humanizeDurationShort } from "../../../humanizeDurationShort";
|
||||
import { ModActionsPlugin } from "../../../plugins/ModActions/ModActionsPlugin";
|
||||
import { getBaseUrl, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { allowTimeout } from "../../../RegExpRunner";
|
||||
import { DAYS, getInviteCodesInString, noop, SECONDS } from "../../../utils";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { humanizeDurationShort } from "../../../humanizeDurationShort";
|
||||
import { getBaseUrl, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { ModActionsPlugin } from "../../../plugins/ModActions/ModActionsPlugin";
|
||||
import { DAYS, SECONDS, getInviteCodesInString, noop } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { utilityCmd, UtilityPluginType } from "../types";
|
||||
import { UtilityPluginType, utilityCmd } from "../types";
|
||||
|
||||
const MAX_CLEAN_COUNT = 150;
|
||||
const MAX_CLEAN_TIME = 1 * DAYS;
|
||||
|
|
|
@ -2,7 +2,7 @@ import { APIEmbed, ChannelType, Snowflake, StageChannel, VoiceChannel } from "di
|
|||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { EmbedWith, formatNumber, MINUTES, preEmbedPadding, trimLines, verboseUserMention } from "../../../utils";
|
||||
import { EmbedWith, MINUTES, formatNumber, preEmbedPadding, trimLines, verboseUserMention } from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Client, GuildPreview, Snowflake } from "discord.js";
|
||||
import { memoize, MINUTES } from "../../../utils";
|
||||
import { MINUTES, memoize } from "../../../utils";
|
||||
|
||||
/**
|
||||
* Memoized getGuildPreview
|
||||
|
|
|
@ -3,8 +3,8 @@ import humanizeDuration from "humanize-duration";
|
|||
import { GuildPluginData } from "knub";
|
||||
import {
|
||||
EmbedWith,
|
||||
formatNumber,
|
||||
GroupDMInvite,
|
||||
formatNumber,
|
||||
inviteHasCounts,
|
||||
isGroupDMInvite,
|
||||
isGuildInvite,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { APIEmbed, MessageType, Snowflake, TextChannel } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { getDefaultMessageCommandPrefix, GuildPluginData } from "knub";
|
||||
import { GuildPluginData, getDefaultMessageCommandPrefix } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { chunkMessageLines, EmbedWith, messageLink, preEmbedPadding, trimEmptyLines, trimLines } from "../../../utils";
|
||||
import { EmbedWith, chunkMessageLines, messageLink, preEmbedPadding, trimEmptyLines, trimLines } from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@ import { GuildPluginData } from "knub";
|
|||
import moment from "moment-timezone";
|
||||
import {
|
||||
EmbedWith,
|
||||
MINUTES,
|
||||
formatNumber,
|
||||
inviteHasCounts,
|
||||
memoize,
|
||||
MINUTES,
|
||||
preEmbedPadding,
|
||||
resolveInvite,
|
||||
resolveUser,
|
||||
|
|
|
@ -12,12 +12,12 @@ import {
|
|||
import escapeStringRegexp from "escape-string-regexp";
|
||||
import { ArgsFromSignatureOrArray, GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { RegExpRunner, allowTimeout } from "../../RegExpRunner";
|
||||
import { getBaseUrl, sendErrorMessage } from "../../pluginUtils";
|
||||
import { allowTimeout, RegExpRunner } from "../../RegExpRunner";
|
||||
import { MINUTES, multiSorter, sorter, trimLines } from "../../utils";
|
||||
import { asyncFilter } from "../../utils/async";
|
||||
import { hasDiscordPermissions } from "../../utils/hasDiscordPermissions";
|
||||
import { inputPatternToRegExp, InvalidRegexError } from "../../validatorUtils";
|
||||
import { InvalidRegexError, inputPatternToRegExp } from "../../validatorUtils";
|
||||
import { banSearchSignature } from "./commands/BanSearchCmd";
|
||||
import { searchCmdSignature } from "./commands/SearchCmd";
|
||||
import { getUserInfoEmbed } from "./functions/getUserInfoEmbed";
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue