From bad96b78879f296d5b9e7adacb03756b0f58427a Mon Sep 17 00:00:00 2001 From: Ven Date: Mon, 28 Nov 2022 13:37:55 +0100 Subject: Path aliases, better lazyWebpack (#268) --- src/plugins/petpet.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/plugins/petpet.ts') diff --git a/src/plugins/petpet.ts b/src/plugins/petpet.ts index 7a794fd..a8281d0 100644 --- a/src/plugins/petpet.ts +++ b/src/plugins/petpet.ts @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext, findOption, sendBotMessage } from "../api/Commands"; -import { Devs } from "../utils/constants"; -import { getGifEncoder } from "../utils/dependencies"; -import { lazyWebpack, makeLazy } from "../utils/misc"; -import definePlugin from "../utils/types"; -import { filters } from "../webpack"; +import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext, findOption, sendBotMessage } from "@api/Commands"; +import { Devs } from "@utils/constants"; +import { getGifEncoder } from "@utils/dependencies"; +import { makeLazy } from "@utils/misc"; +import definePlugin from "@utils/types"; +import { findByCodeLazy, findByPropsLazy } from "@webpack"; const DRAFT_TYPE = 0; const DEFAULT_DELAY = 20; @@ -35,9 +35,9 @@ const getFrames = makeLazy(() => Promise.all( )) ); -const fetchUser = lazyWebpack(filters.byCode(".USER(")); -const promptToUpload = lazyWebpack(filters.byCode("UPLOAD_FILE_LIMIT_ERROR")); -const UploadStore = lazyWebpack(filters.byProps("getUploads")); +const fetchUser = findByCodeLazy(".USER("); +const promptToUpload = findByCodeLazy("UPLOAD_FILE_LIMIT_ERROR"); +const UploadStore = findByPropsLazy("getUploads"); function loadImage(source: File | string) { const isFile = source instanceof File; -- cgit