From 78ce870d14fd788a04890f14734dbbfb37305835 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Mon, 18 Nov 2024 22:29:58 -0500 Subject: [PATCH] Temp Fix --- src/equicordplugins/purgeMessages/index.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/equicordplugins/purgeMessages/index.tsx b/src/equicordplugins/purgeMessages/index.tsx index 7082b87c..5f76d3eb 100644 --- a/src/equicordplugins/purgeMessages/index.tsx +++ b/src/equicordplugins/purgeMessages/index.tsx @@ -25,17 +25,14 @@ import { findByPropsLazy } from "@webpack"; import { Forms, MessageStore, UserStore } from "@webpack/common"; import { Channel, Message } from "discord-types/general"; -import { loggedMessages } from "../messageLoggerEnhanced/LoggedMessageManager"; - const MessageActions = findByPropsLazy("deleteMessage", "startEditMessage"); async function deleteMessages(amount: number, channel: Channel, delay: number = 1500): Promise { let deleted = 0; const userId = UserStore.getCurrentUser().id; const messages: Message[] = JSON.parse(JSON.stringify(MessageStore.getMessages(channel.id)._array.filter((m: Message) => m.author.id === userId).reverse())); - const uniqueMessages: Message[] = !loggedMessages.deletedMessages[channel.id] ? messages : messages.filter(message => !loggedMessages.deletedMessages[channel.id].includes(message.id)); - for (const message of uniqueMessages) { + for (const message of messages) { MessageActions.deleteMessage(channel.id, message.id); amount--; deleted++;