From 1a607639ccc9e7cbd977f5d5306d486508e4cc24 Mon Sep 17 00:00:00 2001 From: Jack <30497388+FieryFlames@users.noreply.github.com> Date: Wed, 25 Oct 2023 12:43:28 -0400 Subject: [PATCH] fix: greetStickerPicker (#1874) --- src/plugins/greetStickerPicker/index.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/plugins/greetStickerPicker/index.tsx b/src/plugins/greetStickerPicker/index.tsx index 52f70b3cd..2c8f33799 100644 --- a/src/plugins/greetStickerPicker/index.tsx +++ b/src/plugins/greetStickerPicker/index.tsx @@ -18,8 +18,9 @@ import { definePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; +import { proxyLazy } from "@utils/lazy"; import definePlugin, { OptionType } from "@utils/types"; -import { findByPropsLazy } from "@webpack"; +import { findByProps, findByPropsLazy } from "@webpack"; import { ContextMenu, FluxDispatcher, Menu } from "@webpack/common"; import { Channel, Message } from "discord-types/general"; @@ -50,6 +51,7 @@ const settings = definePluginSettings({ }>(); const MessageActions = findByPropsLazy("sendGreetMessage"); +const WELCOME_STICKERS = proxyLazy(() => findByProps("WELCOME_STICKERS")?.WELCOME_STICKERS); function greet(channel: Channel, message: Message, stickers: string[]) { const options = MessageActions.getSendMessageOptionsForReply({ @@ -75,7 +77,7 @@ function greet(channel: Channel, message: Message, stickers: string[]) { } -function GreetMenu({ stickers, channel, message }: { stickers: Sticker[], message: Message, channel: Channel; }) { +function GreetMenu({ channel, message }: { message: Message, channel: Channel; }) { const s = settings.use(["greetMode", "multiGreetChoices"]); const { greetMode, multiGreetChoices = [] } = s; @@ -105,7 +107,7 @@ function GreetMenu({ stickers, channel, message }: { stickers: Sticker[], messag