mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-13 16:43:04 -04:00
Make it possible to destructure lazy webpack finds
This commit is contained in:
parent
ffe6512693
commit
b21b6d7e5d
4 changed files with 36 additions and 18 deletions
|
@ -18,9 +18,8 @@
|
|||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { proxyLazy } from "@utils/lazy";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByProps, findByPropsLazy } from "@webpack";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { ContextMenu, FluxDispatcher, Menu } from "@webpack/common";
|
||||
import { Channel, Message } from "discord-types/general";
|
||||
|
||||
|
@ -51,7 +50,7 @@ const settings = definePluginSettings({
|
|||
}>();
|
||||
|
||||
const MessageActions = findByPropsLazy("sendGreetMessage");
|
||||
const WELCOME_STICKERS = proxyLazy(() => findByProps("WELCOME_STICKERS")?.WELCOME_STICKERS);
|
||||
const { WELCOME_STICKERS } = findByPropsLazy("WELCOME_STICKERS");
|
||||
|
||||
function greet(channel: Channel, message: Message, stickers: string[]) {
|
||||
const options = MessageActions.getSendMessageOptionsForReply({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue