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/api/Commands/commandHelpers.ts | 8 ++++---- src/api/Commands/index.ts | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/api/Commands') diff --git a/src/api/Commands/commandHelpers.ts b/src/api/Commands/commandHelpers.ts index 8986248..d363d6e 100644 --- a/src/api/Commands/commandHelpers.ts +++ b/src/api/Commands/commandHelpers.ts @@ -16,15 +16,15 @@ * along with this program. If not, see . */ +import { mergeDefaults } from "@utils/misc"; +import { findByCodeLazy, findByPropsLazy, waitFor } from "@webpack"; import { Message } from "discord-types/general"; import type { PartialDeep } from "type-fest"; -import { lazyWebpack, mergeDefaults } from "../../utils/misc"; -import { filters, waitFor } from "../../webpack"; import { Argument } from "./types"; -const createBotMessage = lazyWebpack(filters.byCode('username:"Clyde"')); -const MessageSender = lazyWebpack(filters.byProps("receiveMessage")); +const createBotMessage = findByCodeLazy('username:"Clyde"'); +const MessageSender = findByPropsLazy("receiveMessage"); let SnowflakeUtils: any; waitFor("fromTimestamp", m => SnowflakeUtils = m); diff --git a/src/api/Commands/index.ts b/src/api/Commands/index.ts index f31043c..88139d4 100644 --- a/src/api/Commands/index.ts +++ b/src/api/Commands/index.ts @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -import { makeCodeblock } from "../../utils/misc"; +import { makeCodeblock } from "@utils/misc"; + import { sendBotMessage } from "./commandHelpers"; import { ApplicationCommandInputType, ApplicationCommandOptionType, ApplicationCommandType, Argument, Command, CommandContext, Option } from "./types"; -- cgit