chore: fix inconsistent import paths

This commit is contained in:
Dragory 2024-01-15 18:05:01 +00:00
parent 3db9090705
commit ac8926cdb8
No known key found for this signature in database
8 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,5 @@
import { Guild, Snowflake } from "discord.js";
import moment from "moment-timezone";
import { isDefaultSticker } from "src/utils/isDefaultSticker";
import { Repository } from "typeorm";
import { TemplateSafeValueContainer, renderTemplate } from "../templateFormatter";
import { renderUsername, trimLines } from "../utils";
@ -10,6 +9,7 @@ import { BaseGuildRepository } from "./BaseGuildRepository";
import { dataSource } from "./dataSource";
import { ArchiveEntry } from "./entities/ArchiveEntry";
import { SavedMessage } from "./entities/SavedMessage";
import { isDefaultSticker } from "../utils/isDefaultSticker";
const DEFAULT_EXPIRY_DAYS = 30;

View file

@ -1,5 +1,4 @@
import { Snowflake } from "discord.js";
import { erisAllowedMentionsToDjsMentionOptions } from "src/utils/erisAllowedMentionsToDjsMentionOptions";
import z from "zod";
import { LogType } from "../../../data/LogType";
import {
@ -19,6 +18,7 @@ import {
zNullishToUndefined,
zSnowflake
} from "../../../utils";
import { erisAllowedMentionsToDjsMentionOptions } from "../../../utils/erisAllowedMentionsToDjsMentionOptions";
import { messageIsEmpty } from "../../../utils/messageIsEmpty";
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
import { InternalPosterPlugin } from "../../InternalPoster/InternalPosterPlugin";

View file

@ -1,14 +1,14 @@
import { ContextMenuCommandInteraction } from "discord.js";
import humanizeDuration from "humanize-duration";
import { GuildPluginData } from "knub";
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";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { MutesPlugin } from "../../Mutes/MutesPlugin";
import { ContextMenuPluginType } from "../types";
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
import { canActOn } from "../../../pluginUtils";
export async function muteAction(
pluginData: GuildPluginData<ContextMenuPluginType>,

View file

@ -1,11 +1,11 @@
import { GuildTextBasedChannel, User } from "discord.js";
import { GuildPluginData } from "knub";
import { deactivateMentions, disableCodeBlocks } from "knub/helpers";
import { resolveChannelIds } from "src/utils/resolveChannelIds";
import { LogType } from "../../../data/LogType";
import { SavedMessage } from "../../../data/entities/SavedMessage";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { UnknownUser } from "../../../utils";
import { resolveChannelIds } from "../../../utils/resolveChannelIds";
import {
channelToTemplateSafeChannel,
savedMessageToTemplateSafeSavedMessage,

View file

@ -2,8 +2,6 @@ import { Snowflake } from "discord.js";
import humanizeDuration from "humanize-duration";
import { GuildPluginData } from "knub";
import moment from "moment-timezone";
import { LogType } from "src/data/LogType";
import { logger } from "src/logger";
import { CaseTypes } from "../../../data/CaseTypes";
import { Tempban } from "../../../data/entities/Tempban";
import { resolveUser } from "../../../utils";
@ -13,6 +11,8 @@ import { IgnoredEventType, ModActionsPluginType } from "../types";
import { formatReasonWithAttachments } from "./formatReasonWithAttachments";
import { ignoreEvent } from "./ignoreEvent";
import { isBanned } from "./isBanned";
import { LogType } from "../../../data/LogType";
import { logger } from "../../../logger";
export async function clearTempban(pluginData: GuildPluginData<ModActionsPluginType>, tempban: Tempban) {
if (!(await isBanned(pluginData, tempban.user_id))) {

View file

@ -1,4 +1,4 @@
import { trimPluginDescription } from "src/utils";
import { trimPluginDescription } from "../../utils";
import { TemplateFunction } from "./types";
export function generateTemplateMarkdown(definitions: TemplateFunction[]): string {

View file

@ -1,12 +1,12 @@
import { Snowflake, TextChannel } from "discord.js";
import { GuildPluginData } from "knub";
import { erisAllowedMentionsToDjsMentionOptions } from "src/utils/erisAllowedMentionsToDjsMentionOptions";
import { SavedMessage } from "../../../data/entities/SavedMessage";
import { convertDelayStringToMS, resolveMember, zStrictMessageContent } from "../../../utils";
import { messageIsEmpty } from "../../../utils/messageIsEmpty";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { TagsPluginType } from "../types";
import { matchAndRenderTagFromString } from "./matchAndRenderTagFromString";
import { erisAllowedMentionsToDjsMentionOptions } from "../../../utils/erisAllowedMentionsToDjsMentionOptions";
export async function onMessageCreate(pluginData: GuildPluginData<TagsPluginType>, msg: SavedMessage) {
if (msg.is_bot) return;

View file

@ -13,7 +13,6 @@ import {
User,
} from "discord.js";
import { GuildPluginData } from "knub";
import { UnknownUser, renderUserUsername } from "src/utils";
import { Case } from "../data/entities/Case";
import {
ISavedMessageAttachmentData,
@ -27,6 +26,7 @@ import {
TypedTemplateSafeValueContainer,
ingestDataIntoTemplateSafeValueContainer,
} from "../templateFormatter";
import { UnknownUser, renderUserUsername } from "../utils";
type InputProps<T> = Omit<
{