BetterFolders: Fix patch; MessageLogger: Ignore Venbot; ReviewDB: Clean migration code

This commit is contained in:
Nuckyz 2024-04-30 17:34:45 -03:00
parent 840c775ed8
commit 97886e5728
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
3 changed files with 4 additions and 10 deletions

View file

@ -209,7 +209,7 @@ export default definePlugin({
predicate: () => settings.store.closeAllHomeButton, predicate: () => settings.store.closeAllHomeButton,
replacement: { replacement: {
// Close all folders when clicking the home button // Close all folders when clicking the home button
match: /(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/, match: /(?<=onClick:\(\)=>{)(?=.{0,300}"discodo")/,
replace: "$self.closeFolders();" replace: "$self.closeFolders();"
} }
} }

View file

@ -217,7 +217,9 @@ export default definePlugin({
ignoreChannels.includes(message.channel_id) || ignoreChannels.includes(message.channel_id) ||
ignoreChannels.includes(ChannelStore.getChannel(message.channel_id)?.parent_id) || ignoreChannels.includes(ChannelStore.getChannel(message.channel_id)?.parent_id) ||
(isEdit ? !logEdits : !logDeletes) || (isEdit ? !logEdits : !logDeletes) ||
ignoreGuilds.includes(ChannelStore.getChannel(message.channel_id)?.guild_id); ignoreGuilds.includes(ChannelStore.getChannel(message.channel_id)?.guild_id) ||
// Ignore Venbot in the support channel
(message.channel_id === "1026515880080842772" && message.author?.id === "1017176847865352332");
}, },
// Based on canary 63b8f1b4f2025213c5cf62f0966625bee3d53136 // Based on canary 63b8f1b4f2025213c5cf62f0966625bee3d53136

View file

@ -23,7 +23,6 @@ import ErrorBoundary from "@components/ErrorBoundary";
import ExpandableHeader from "@components/ExpandableHeader"; import ExpandableHeader from "@components/ExpandableHeader";
import { OpenExternalIcon } from "@components/Icons"; import { OpenExternalIcon } from "@components/Icons";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import { Logger } from "@utils/Logger";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Alerts, Menu, Parser, useState } from "@webpack/common"; import { Alerts, Menu, Parser, useState } from "@webpack/common";
import { Guild, User } from "discord-types/general"; import { Guild, User } from "discord-types/general";
@ -75,13 +74,6 @@ export default definePlugin({
const s = settings.store; const s = settings.store;
const { lastReviewId, notifyReviews } = s; const { lastReviewId, notifyReviews } = s;
const legacy = s as any as { token?: string; };
if (legacy.token) {
await updateAuth({ token: legacy.token });
legacy.token = undefined;
new Logger("ReviewDB").info("Migrated legacy settings");
}
await initAuth(); await initAuth();
setTimeout(async () => { setTimeout(async () => {