diff options
author | Vendicated <vendicated@riseup.net> | 2022-11-22 22:42:22 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-11-22 22:42:22 +0100 |
commit | 0239bb0aac97513006be513b5c967c9b53294be9 (patch) | |
tree | 5f63c2be3163586e333e5f3c770aa8eab3a7be19 /src | |
parent | ec20556d5c59d9ad766e8a2e6d63dfc20e80c396 (diff) | |
download | Vencord-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.ts | 9 |
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||($&)" + } } ], }); |