Merge GuildTagSettings & EquicordHelper

This commit is contained in:
thororen1234 2026-03-20 08:49:41 -04:00
parent a3319f762b
commit e1ec9bae6a
No known key found for this signature in database
2 changed files with 15 additions and 47 deletions

View file

@ -23,6 +23,7 @@ import { PluginCards } from "./pluginCards";
migratePluginToSettings(true, "EquicordHelper", "NoBulletPoints", "noBulletPoints");
migratePluginToSettings(true, "EquicordHelper", "NoModalAnimation", "noModalAnimation");
migratePluginToSettings(true, "EquicordHelper", "GuildTagSettings", "disableAdoptTagPrompt");
let clicked = false;
@ -121,6 +122,12 @@ const settings = definePluginSettings({
restartNeeded: true,
default: false
},
disableAdoptTagPrompt: {
type: OptionType.BOOLEAN,
description: "Disable the prompt to adopt tags",
default: true,
restartNeeded: true
},
});
export default definePlugin({
@ -257,6 +264,14 @@ export default definePlugin({
match: /200:300/g,
replace: "0:0",
},
},
{
find: "GuildTagAvailableCoachmark",
replacement: {
match: /return.{0,100}shouldShow/g,
replace: "return null;$&"
},
predicate: () => settings.store.disableAdoptTagPrompt
}
],
renderMessageAccessory(props) {

View file

@ -1,47 +0,0 @@
/*
* Vencord, a modification for Discord's desktop app
* Copyright (c) 2022 Vendicated and Megumin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
const settings = definePluginSettings({
disableAdoptTagPrompt: {
type: OptionType.BOOLEAN,
description: "Disable the prompt to adopt tags",
default: true,
restartNeeded: true
}
});
export default definePlugin({
name: "GuildTagSettings",
description: "Adds some settings for guild tags, such as hiding them or disabling the prompt to adopt them.",
authors: [Devs.thororen],
settings,
patches: [
{
find: "GuildTagAvailableCoachmark",
replacement: {
match: /return.{0,100}shouldShow/g,
replace: "return null;$&"
},
predicate: () => settings.store.disableAdoptTagPrompt
}
]
});