aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-11-22 22:42:22 +0100
committerVendicated <vendicated@riseup.net>2022-11-22 22:42:22 +0100
commit0239bb0aac97513006be513b5c967c9b53294be9 (patch)
tree5f63c2be3163586e333e5f3c770aa8eab3a7be19 /src
parentec20556d5c59d9ad766e8a2e6d63dfc20e80c396 (diff)
downloadVencord-0239bb0aac97513006be513b5c967c9b53294be9.tar.gz
Vencord-0239bb0aac97513006be513b5c967c9b53294be9.tar.bz2
Vencord-0239bb0aac97513006be513b5c967c9b53294be9.zip
Commands: Show plugin name instead of 'Built-In'
Diffstat (limited to 'src')
-rw-r--r--src/plugins/apiCommands.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/apiCommands.ts b/src/plugins/apiCommands.ts
index 7b08b8a..4136deb 100644
--- a/src/plugins/apiCommands.ts
+++ b/src/plugins/apiCommands.ts
@@ -47,6 +47,15 @@ export default definePlugin({
match: /,(.{1,2})\.execute\((.{1,2}),(.{1,2})\)]/,
replace: (_, cmd, args, ctx) => `,Vencord.Api.Commands._handleCommand(${cmd}, ${args}, ${ctx})]`
}
+ },
+ // Show plugin name instead of "Built-In"
+ {
+ find: "().source,children",
+ replacement: {
+ // ...children: p?.name
+ match: /(?<=:(.{1,3})\.displayDescription\}.{0,200}\(\)\.source,children:)[^}]+/,
+ replace: "$1.plugin||($&)"
+ }
}
],
});