diff options
author | Ven <vendicated@riseup.net> | 2022-11-28 13:37:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 13:37:55 +0100 |
commit | bad96b78879f296d5b9e7adacb03756b0f58427a (patch) | |
tree | 4ddbc57a29e9b201bee1317f18110e8e1ad320e5 /src/plugins/fakeNitro.ts | |
parent | 7a4402f1425ea9fdc6d2b3c985a4ce831f405937 (diff) | |
download | Vencord-bad96b78879f296d5b9e7adacb03756b0f58427a.tar.gz Vencord-bad96b78879f296d5b9e7adacb03756b0f58427a.tar.bz2 Vencord-bad96b78879f296d5b9e7adacb03756b0f58427a.zip |
Path aliases, better lazyWebpack (#268)
Diffstat (limited to 'src/plugins/fakeNitro.ts')
-rw-r--r-- | src/plugins/fakeNitro.ts | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/plugins/fakeNitro.ts b/src/plugins/fakeNitro.ts index c682324..0a1985a 100644 --- a/src/plugins/fakeNitro.ts +++ b/src/plugins/fakeNitro.ts @@ -16,18 +16,16 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { addPreEditListener, addPreSendListener, removePreEditListener, removePreSendListener } from "../api/MessageEvents"; -import { migratePluginSettings } from "../api/settings"; -import { Devs } from "../utils/constants"; -import { ApngDisposeOp, getGifEncoder, importApngJs } from "../utils/dependencies"; -import { lazyWebpack } from "../utils/misc"; -import definePlugin, { OptionType } from "../utils/types"; -import { Settings } from "../Vencord"; -import { filters } from "../webpack"; -import { ChannelStore, UserStore } from "../webpack/common"; +import { addPreEditListener, addPreSendListener, removePreEditListener, removePreSendListener } from "@api/MessageEvents"; +import { migratePluginSettings, Settings } from "@api/settings"; +import { Devs } from "@utils/constants"; +import { ApngDisposeOp, getGifEncoder, importApngJs } from "@utils/dependencies"; +import definePlugin, { OptionType } from "@utils/types"; +import { findByCodeLazy, findByPropsLazy } from "@webpack"; +import { ChannelStore, UserStore } from "@webpack/common"; const DRAFT_TYPE = 0; -const promptToUpload = lazyWebpack(filters.byCode("UPLOAD_FILE_LIMIT_ERROR")); +const promptToUpload = findByCodeLazy("UPLOAD_FILE_LIMIT_ERROR"); interface BaseSticker { available: boolean; @@ -225,8 +223,8 @@ export default definePlugin({ return; } - const EmojiStore = lazyWebpack(filters.byProps("getCustomEmojiById")); - const StickerStore = lazyWebpack(filters.byProps("getAllGuildStickers")) as { + const EmojiStore = findByPropsLazy("getCustomEmojiById"); + const StickerStore = findByPropsLazy("getAllGuildStickers") as { getPremiumPacks(): StickerPack[]; getAllGuildStickers(): Map<string, Sticker[]>; getStickerById(id: string): Sticker | undefined; |