use findByPropsLazy

This commit is contained in:
lumap 2025-02-06 11:17:17 +01:00
parent 414d01a9da
commit 33aacf7277

View file

@ -8,7 +8,9 @@ import { UploadIcon } from "@components/Icons";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { ChannelStore, MessageStore, PermissionsBits, PermissionStore, SelectedChannelStore, showToast, UserStore } from "@webpack/common"; 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({ export default definePlugin({
name: "AddAttachments", name: "AddAttachments",
@ -57,7 +59,7 @@ export default definePlugin({
{ {
filename: file.name, filename: file.name,
file_size: file.size, file_size: file.size,
id: findByProps("uniqueId").uniqueId(), id: uniqueIdProp.uniqueId(),
is_clip: false is_clip: false
} }
] ]