aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/supportHelper.tsx
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-05-29 04:01:02 +0200
committerV <vendicated@riseup.net>2023-05-30 15:23:32 +0200
commit9023d45d9e594c49b09e4c7c0e6f23f539dad3d2 (patch)
tree05cb4e2a4bd15b12986d0eaed4ba166ef58c5eca /src/plugins/supportHelper.tsx
parentbee70390a9a2ca5048392961c4d3e94f8134eae8 (diff)
downloadVencord-9023d45d9e594c49b09e4c7c0e6f23f539dad3d2.tar.gz
Vencord-9023d45d9e594c49b09e4c7c0e6f23f539dad3d2.tar.bz2
Vencord-9023d45d9e594c49b09e4c7c0e6f23f539dad3d2.zip
Improve /vencord-debug
Diffstat (limited to 'src/plugins/supportHelper.tsx')
-rw-r--r--src/plugins/supportHelper.tsx31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/plugins/supportHelper.tsx b/src/plugins/supportHelper.tsx
index 8b0880d..cce7e9a 100644
--- a/src/plugins/supportHelper.tsx
+++ b/src/plugins/supportHelper.tsx
@@ -31,6 +31,12 @@ import settings from "./settings";
const REMEMBER_DISMISS_KEY = "Vencord-SupportHelper-Dismiss";
+const AllowedChannelIds = [
+ SUPPORT_CHANNEL_ID,
+ "1024286218801926184", // Vencord > #bot-spam
+ "1033680203433660458", // Vencord > #v
+];
+
export default definePlugin({
name: "SupportHelper",
required: true,
@@ -41,7 +47,7 @@ export default definePlugin({
commands: [{
name: "vencord-debug",
description: "Send Vencord Debug info",
- predicate: ctx => ctx.channel.id === SUPPORT_CHANNEL_ID,
+ predicate: ctx => AllowedChannelIds.includes(ctx.channel.id),
execute() {
const { RELEASE_CHANNEL } = window.GLOBAL_ENV;
@@ -52,21 +58,26 @@ export default definePlugin({
return `Web (${navigator.userAgent})`;
})();
+ const isApiPlugin = (plugin: string) => plugin.endsWith("API") || plugins[plugin].required;
+
+ const enabledPlugins = Object.keys(plugins).filter(p => Vencord.Plugins.isPluginEnabled(p) && !isApiPlugin(p));
+ const enabledApiPlugins = Object.keys(plugins).filter(p => Vencord.Plugins.isPluginEnabled(p) && isApiPlugin(p));
+
const debugInfo = `
**Vencord Debug Info**
+>>> Discord Branch: ${RELEASE_CHANNEL}
+Client: ${client}
+Platform: ${window.navigator.platform}
+Vencord: ${gitHash}${settings.additionalInfo}
+Outdated: ${isOutdated}
+OpenAsar: ${"openasar" in window}
-> Discord Branch: ${RELEASE_CHANNEL}
-> Client: ${client}
-> Platform: ${window.navigator.platform}
-> Vencord Version: ${gitHash}${settings.additionalInfo}
-> OpenAsar: ${"openasar" in window}
-> Outdated: ${isOutdated}
-> Enabled Plugins:
-${makeCodeblock(Object.keys(plugins).filter(Vencord.Plugins.isPluginEnabled).join(", "))}
+Enabled Plugins (${enabledPlugins.length + enabledApiPlugins.length}):
+${makeCodeblock(enabledPlugins.join(", ") + "\n\n" + enabledApiPlugins.join(", "))}
`;
return {
- content: debugInfo.trim()
+ content: debugInfo.trim().replaceAll("```\n", "```")
};
}
}],