ty haruka for this, using uniqueId properly

This commit is contained in:
lumap 2025-02-06 11:05:06 +01:00
parent 100d609793
commit 955e433561

View file

@ -8,7 +8,7 @@ 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 } from "webpack"; import { Common, findByProps } from "webpack";
export default definePlugin({ export default definePlugin({
name: "AddAttachments", name: "AddAttachments",
@ -57,7 +57,7 @@ export default definePlugin({
{ {
filename: file.name, filename: file.name,
file_size: file.size, file_size: file.size,
id: Math.round(Math.random() * 99999999), id: findByProps("uniqueId").uniqueId(),
is_clip: false is_clip: false
} }
] ]