From a52b5924ac171f1b56e01d3bf6b720ac32b44421 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 31 Dec 2025 20:37:57 -0500 Subject: [PATCH] Webpack: Export DraftActions & PinActions --- src/plugins/showAllMessageButtons/index.ts | 8 ++------ src/webpack/common/utils.ts | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/plugins/showAllMessageButtons/index.ts b/src/plugins/showAllMessageButtons/index.ts index 10069a583..2d1f4bcb1 100644 --- a/src/plugins/showAllMessageButtons/index.ts +++ b/src/plugins/showAllMessageButtons/index.ts @@ -7,8 +7,7 @@ import { definePluginSettings } from "@api/Settings"; import { Devs, EquicordDevs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; -import { findByPropsLazy } from "@webpack"; -import { MessageActions } from "@webpack/common"; +import { MessageActions, PinActions } from "@webpack/common"; const settings = definePluginSettings({ noShiftDelete: { @@ -23,8 +22,6 @@ const settings = definePluginSettings({ }, }); -const PinActions = findByPropsLazy("pinMessage", "unpinMessage"); - export default definePlugin({ name: "ShowAllMessageButtons", description: "Always show all message buttons no matter if you are holding the shift key or not.", @@ -57,8 +54,7 @@ export default definePlugin({ MessageActions.deleteMessage(channel_id, id); }, toggleMessagePin({ channel, message }) { - if (message.pinned) - return PinActions.unpinMessage(channel, message.id); + if (message.pinned) return PinActions.unpinMessage(channel, message.id); PinActions.pinMessage(channel, message.id); }, diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index 46bc56d12..86d00ebce 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -189,6 +189,8 @@ export const ChannelActionCreators = findByPropsLazy("openPrivateChannel"); export const VoiceActions = findByPropsLazy("toggleSelfMute"); export const GuildActions = findByPropsLazy("setServerMute", "setServerDeaf"); export const ChannelActions = findByPropsLazy("selectChannel", "selectVoiceChannel"); +export const DraftActions = findByPropsLazy("saveDraft", "changeDraft"); +export const PinActions = findByPropsLazy("pinMessage", "unpinMessage"); export const IconUtils: t.IconUtils = findByPropsLazy("getGuildBannerURL", "getUserAvatarURL");