PatchHelper, a tool to help you write patches (#182)

This commit is contained in:
Ven 2022-11-01 01:49:41 +01:00 committed by GitHub
parent 0c25278c59
commit 04d6f341ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 394 additions and 43 deletions

View file

@ -55,11 +55,13 @@ export default definePlugin({
match: /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/,
replace: (m, mod) => {
const updater = !IS_WEB ? '{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater},' : "";
const patchHelper = IS_DEV ? '{section:"VencordPatchHelper",label:"PatchHelper",element:Vencord.Components.PatchHelper},' : "";
return (
`{section:${mod}.ID.HEADER,label:"Vencord"},` +
'{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},' +
'{section:"VencordPlugins",label:"Plugins",element:Vencord.Components.PluginSettings},' +
updater +
patchHelper +
`{section:${mod}.ID.DIVIDER},${m}`
);
}