Skip to content

Latest commit

 

History

History
97 lines (83 loc) · 3.43 KB

Vencord.md

File metadata and controls

97 lines (83 loc) · 3.43 KB

Vencord for Discord Bot Client

This is the readme file for the repo VencordDBC, summarizing what I have added/modified in the original repository (I did not include this in the original repo's readme because it might get lost).

All Changes Made So Far:

browser/manifest.json

  • Summary: Allows the extension to operate on any URL (specifically localhost).
  • Changes:
    "host_permissions": [
        "*://*.discord.com/*",
        "https://raw.githubusercontent.com/*",
        "*://localhost:*/*"
    ],
    "content_scripts": [
        {
            "run_at": "document_start",
            "matches": ["*://*.discord.com/*", "*://localhost:*/*"],
            "js": ["content.js"],
            "all_frames": true,
            "world": "ISOLATED"
        },
        {
            "run_at": "document_start",
            "matches": ["*://*.discord.com/*", "*://localhost:*/*"],
            "js": ["dist/Vencord.js"],
            "all_frames": true,
            "world": "MAIN"
        }
    ],
    "web_accessible_resources": [
        {
            "resources": ["dist/*", "third-party/*"],
            "matches": ["*://*.discord.com/*", "*://localhost:*/*"]
        }
    ],

scripts/build/buildWeb.mjs

  • Summary: Automatically creates an Extension file and moves it to the root folder containing Discord Bot Client.
  • Changes:
    import { readFileSync, existsSync, renameSync, rmSync } from "fs";
    
    // Move folder (BotClient only)
    if (existsSync("../VencordExtension"))
        rmSync("../VencordExtension", { recursive: true });
    renameSync("dist/chromium-unpacked", "../VencordExtension");
    rmSync("dist", { recursive: true });
    console.info("Moved folder Extension to ../VencordExtension");

src/plugins/_core/settings.tsx

  • Summary: Displays DBC version in settings.
  • Changes:
    get botClientVersion() {
        return window.BotClientNative?.getBotClientVersion() || "^3.6.0";
    },
    getInfoRows() {
        const { electronVersion, chromiumVersion, additionalInfo, botClientVersion } = this;
    
        const rows = [`Vencord ${gitHash}${additionalInfo}`];
    
        if (botClientVersion) rows.push(`BotClient ${botClientVersion}`);
        if (electronVersion) rows.push(`Electron ${electronVersion}`);
        if (chromiumVersion) rows.push(`Chromium ${chromiumVersion}`);
    
        return rows;
    },

src/plugins/_core/noTrack.ts

  • Summary: Disable Sentry
  • Changes:
                const { stack } = new Error();
                if (!(stack?.includes("discord.com") || stack?.includes("discordapp.com") || stack?.includes("localhost")) || !String(this).includes("exports:{}") || this.c != null) {
                    return;
                }

src/plugins/botClient/**/*

  • Summary: Contains botClient plugin and necessary components.

src/webpack/patchWebpack.ts

  • Summary: Ensures that the extension works properly.
  • Changes:
    if ((stack?.includes("discord.com") || stack?.includes("discordapp.com") || stack?.includes("localhost")) && !Array.isArray(v)) ...

The above is a summary of the changes to help contributors identify what has been modified compared to the original Vencord repository.

After applying the Vencord patch

  • You should check the features according to the following list: #183.