This commit is contained in:
thororen1234 2024-07-12 15:59:55 -04:00
parent 1e079a70e9
commit d23b8af79a
4 changed files with 7 additions and 22 deletions

View file

@ -73,7 +73,8 @@ const IGNORED_DISCORD_ERRORS = [
"Downloading the full bad domains file", "Downloading the full bad domains file",
/\[GatewaySocket\].{0,110}Cannot access '/, /\[GatewaySocket\].{0,110}Cannot access '/,
"search for 'name' in undefined", "search for 'name' in undefined",
"Attempting to set fast connect zstd when unsupported" "Attempting to set fast connect zstd when unsupported",
"Webpack Find Fail: waitForStore(\"PermissionStore\")"
] as Array<string | RegExp>; ] as Array<string | RegExp>;
function toCodeBlock(s: string, indentation = 0, isDiscord = false) { function toCodeBlock(s: string, indentation = 0, isDiscord = false) {

View file

@ -251,12 +251,6 @@ export const settings = definePluginSettings({
description: "Usually message logger only logs from whitelisted ids and dms, enabling this would mean it would log messages from all servers as well. Note that this may cause the cache to exceed its limit, resulting in some messages being missed. If you are in a lot of servers, this may significantly increase the chances of messages being logged, which can result in a large message record and the inclusion of irrelevant messages.", description: "Usually message logger only logs from whitelisted ids and dms, enabling this would mean it would log messages from all servers as well. Note that this may cause the cache to exceed its limit, resulting in some messages being missed. If you are in a lot of servers, this may significantly increase the chances of messages being logged, which can result in a large message record and the inclusion of irrelevant messages.",
}, },
autoCheckForUpdates: {
default: true,
type: OptionType.BOOLEAN,
description: "Automatically check for updates on startup.",
},
ignoreBots: { ignoreBots: {
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
description: "Whether to ignore messages by bots", description: "Whether to ignore messages by bots",
@ -309,7 +303,7 @@ export const settings = definePluginSettings({
permanentlyRemoveLogByDefault: { permanentlyRemoveLogByDefault: {
default: false, default: false,
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
description: "Vencord's base MessageLogger remove log button wiil delete logs permanently", description: "Equicord's base MessageLogger remove log button wiil delete logs permanently",
}, },
hideMessageFromMessageLoggers: { hideMessageFromMessageLoggers: {

View file

@ -5,7 +5,6 @@
*/ */
import ErrorBoundary from "@components/ErrorBoundary"; import ErrorBoundary from "@components/ErrorBoundary";
import { onceDefined } from "@shared/onceDefined";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import { getCurrentChannel } from "@utils/discord"; import { getCurrentChannel } from "@utils/discord";
import { Logger } from "@utils/Logger"; import { Logger } from "@utils/Logger";
@ -19,15 +18,7 @@ const getCreatedAtDate = findByCodeLazy('month:"short",day:"numeric"');
const locale = findByPropsLazy("getLocale"); const locale = findByPropsLazy("getLocale");
const lastSection = findByPropsLazy("lastSection"); const lastSection = findByPropsLazy("lastSection");
let section; const section = findLazy((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2);
onceDefined(window, "GLOBAL_ENV", v => {
if (v.RELEASE_CHANNEL === "stable") {
section = findLazy((m: any) => m.section !== void 0 && Object.values(m).length === 1);
} else {
section = findLazy((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2);
}
});
export default definePlugin({ export default definePlugin({
name: "FriendsSince", name: "FriendsSince",

View file

@ -263,11 +263,10 @@ export default definePlugin({
// it's either this or extremely long lookbehind // it's either this or extremely long lookbehind
match: /user:\i,nick:\i,/, match: /user:\i,nick:\i,/,
replace: "$&moreTags_channelId," replace: "$&moreTags_channelId,"
}, }, {
...[/,botType:(\i\((\i)\)),/g, /,botType:(\i),(?<=user:(\i).+?)/g].map(match => ({ match: /,botType:(\i),(?<=user:(\i).+?)/g,
match,
replace: ",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'})," replace: ",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),"
})), }
] ]
}, },
], ],