Commands: Show plugin name instead of 'Built-In'

This commit is contained in:
Vendicated 2022-11-22 22:42:22 +01:00
parent ec20556d5c
commit 0239bb0aac
No known key found for this signature in database
GPG Key ID: EC781ADFB93EFFA3

@ -47,6 +47,15 @@ export default definePlugin({
match: /,(.{1,2})\.execute\((.{1,2}),(.{1,2})\)]/, match: /,(.{1,2})\.execute\((.{1,2}),(.{1,2})\)]/,
replace: (_, cmd, args, ctx) => `,Vencord.Api.Commands._handleCommand(${cmd}, ${args}, ${ctx})]` 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||($&)"
}
} }
], ],
}); });