From 33aacf7277570ac183db8c907338ef874c23704a Mon Sep 17 00:00:00 2001 From: lumap Date: Thu, 6 Feb 2025 11:17:17 +0100 Subject: [PATCH] use findByPropsLazy --- src/plugins/addAttachments/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/addAttachments/index.tsx b/src/plugins/addAttachments/index.tsx index c66f18721..6eae552b9 100644 --- a/src/plugins/addAttachments/index.tsx +++ b/src/plugins/addAttachments/index.tsx @@ -8,7 +8,9 @@ import { UploadIcon } from "@components/Icons"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; import { ChannelStore, MessageStore, PermissionsBits, PermissionStore, SelectedChannelStore, showToast, UserStore } from "@webpack/common"; -import { Common, findByProps } from "webpack"; +import { Common, findByPropsLazy } from "webpack"; + +const uniqueIdProp = findByPropsLazy("uniqueId"); export default definePlugin({ name: "AddAttachments", @@ -57,7 +59,7 @@ export default definePlugin({ { filename: file.name, file_size: file.size, - id: findByProps("uniqueId").uniqueId(), + id: uniqueIdProp.uniqueId(), is_clip: false } ]