├── .github
└── workflows
│ └── build-and-deploy.yml
├── .gitignore
├── .vitepress
├── config.ts
└── theme
│ ├── custom.css
│ └── index.ts
├── CONTRIBUTING.md
├── README.md
├── docs
├── api
│ ├── addonapi.md
│ ├── bdapi.md
│ ├── components.md
│ ├── contextmenu.md
│ ├── data.md
│ ├── dom.md
│ ├── filters.md
│ ├── index.md
│ ├── logger.md
│ ├── net.md
│ ├── patcher.md
│ ├── reactutils.md
│ ├── ui.md
│ ├── utils.md
│ └── webpack.md
├── developers
│ ├── addons.md
│ ├── devtools.md
│ ├── environment.md
│ ├── img
│ │ ├── connect.png
│ │ ├── developer_settings.png
│ │ ├── devtools_tab_overflow.png
│ │ ├── react_devtools.png
│ │ └── submit.png
│ ├── index.md
│ └── submitting.md
├── discord
│ ├── index.md
│ ├── modules
│ │ ├── data-stores.md
│ │ ├── flux-events.md
│ │ └── index.md
│ └── variables.md
├── index.md
├── plugins
│ ├── advanced
│ │ ├── img
│ │ │ ├── breakpoint_click.png
│ │ │ ├── breakpoint_handle.png
│ │ │ ├── click_minified.png
│ │ │ ├── click_script.png
│ │ │ ├── default_export.png
│ │ │ ├── exports.png
│ │ │ ├── function_location.png
│ │ │ ├── open.png
│ │ │ ├── our_button.png
│ │ │ ├── react_ancestor.png
│ │ │ ├── react_candidate.png
│ │ │ ├── react_component.png
│ │ │ ├── react_exports.png
│ │ │ ├── react_parent.png
│ │ │ ├── react_path.png
│ │ │ ├── react_render.png
│ │ │ ├── react_target.png
│ │ │ ├── return_value.png
│ │ │ ├── return_value_expanded.png
│ │ │ ├── right_click.png
│ │ │ ├── tree_traversal.png
│ │ │ ├── view_source.png
│ │ │ ├── webpack_allstrings.png
│ │ │ └── webpack_bykeys.png
│ │ ├── patching.md
│ │ ├── react.md
│ │ └── webpack.md
│ ├── basics
│ │ ├── addons.md
│ │ ├── creating-a-plugin.md
│ │ ├── discord.md
│ │ ├── dom.md
│ │ ├── img
│ │ │ ├── plugin_settings.png
│ │ │ ├── servers.png
│ │ │ └── ui
│ │ │ │ ├── alert_basic.png
│ │ │ │ ├── alert_console.png
│ │ │ │ ├── alert_input.png
│ │ │ │ ├── alert_react.png
│ │ │ │ ├── confirmation_advanced.png
│ │ │ │ ├── confirmation_basic.png
│ │ │ │ ├── modal.png
│ │ │ │ ├── notice.png
│ │ │ │ ├── notice_advanced.png
│ │ │ │ ├── notice_basic.png
│ │ │ │ ├── popout.png
│ │ │ │ ├── toast.png
│ │ │ │ ├── toast_basic.png
│ │ │ │ ├── toast_error.png
│ │ │ │ ├── toast_info.png
│ │ │ │ ├── toast_success.png
│ │ │ │ ├── toast_warning.png
│ │ │ │ └── tooltip.png
│ │ ├── settings.md
│ │ └── ui.md
│ ├── index.md
│ ├── intermediate
│ │ ├── bundling.md
│ │ ├── img
│ │ │ ├── plugin_card.png
│ │ │ ├── plugin_modal.png
│ │ │ └── plugin_settings.png
│ │ └── react.md
│ └── introduction
│ │ ├── environment.md
│ │ ├── guidelines.md
│ │ ├── quick-start.md
│ │ └── structure.md
├── public
│ ├── branding
│ │ ├── backdrop.png
│ │ ├── changelogtemplate.xcf
│ │ ├── invitebanner.png
│ │ ├── logo_large.jpeg
│ │ ├── logo_large.png
│ │ ├── logo_large.svg
│ │ ├── logo_large_black.png
│ │ ├── logo_small.jpeg
│ │ ├── logo_small.png
│ │ ├── logo_small.svg
│ │ ├── logo_solid.png
│ │ ├── logo_solid_transparent.png
│ │ ├── logo_very_small.png
│ │ ├── serverbanner.png
│ │ └── split.png
│ └── favicon
│ │ ├── android-icon-144x144.png
│ │ ├── android-icon-192x192.png
│ │ ├── android-icon-36x36.png
│ │ ├── android-icon-48x48.png
│ │ ├── android-icon-72x72.png
│ │ ├── android-icon-96x96.png
│ │ ├── apple-icon-114x114.png
│ │ ├── apple-icon-120x120.png
│ │ ├── apple-icon-144x144.png
│ │ ├── apple-icon-152x152.png
│ │ ├── apple-icon-180x180.png
│ │ ├── apple-icon-57x57.png
│ │ ├── apple-icon-60x60.png
│ │ ├── apple-icon-72x72.png
│ │ ├── apple-icon-76x76.png
│ │ ├── apple-icon-precomposed.png
│ │ ├── apple-icon.png
│ │ ├── browserconfig.xml
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── favicon-96x96.png
│ │ ├── manifest.json
│ │ ├── ms-icon-144x144.png
│ │ ├── ms-icon-150x150.png
│ │ ├── ms-icon-310x310.png
│ │ └── ms-icon-70x70.png
├── themes
│ ├── advanced
│ │ ├── performance.md
│ │ └── preprocessing.md
│ ├── basics
│ │ ├── creating.md
│ │ ├── img
│ │ │ ├── caniuse.png
│ │ │ └── guild_list.png
│ │ ├── process.md
│ │ └── selectors.md
│ ├── index.md
│ ├── intermediate
│ │ ├── accessibility.md
│ │ ├── img
│ │ │ ├── backdrop_filter.png
│ │ │ ├── github_branch.png
│ │ │ ├── github_deploy.png
│ │ │ ├── github_live.png
│ │ │ ├── github_pages.png
│ │ │ └── github_tabs.png
│ │ ├── remote.md
│ │ ├── transparency.md
│ │ └── user.md
│ └── introduction
│ │ ├── environment.md
│ │ ├── guidelines.md
│ │ ├── quick-start.md
│ │ └── structure.md
└── users
│ ├── getting-started
│ ├── configuration.md
│ ├── faq.md
│ ├── img
│ │ ├── agreement_text.png
│ │ ├── bd_settings_tabs.png
│ │ ├── installer.png
│ │ └── programdata.gif
│ ├── installation.md
│ └── troubleshooting.md
│ ├── guides
│ ├── img
│ │ └── addon_card.png
│ ├── installing-addons.md
│ └── vanilla.md
│ └── index.md
├── eslint.config.js
├── package-lock.json
├── package.json
├── scripts
├── apigen.ts
├── data
│ └── jsdoc-ast.json
├── eslint.config.js
├── parseast.ts
└── types.d.ts
└── tsconfig.json
/.github/workflows/build-and-deploy.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to GitHub Pages
2 |
3 | # Auto generate on a push to main, also allow manually triggering
4 | on:
5 | push:
6 | branches:
7 | - main
8 | workflow_dispatch:
9 |
10 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11 | permissions:
12 | contents: read
13 | pages: write
14 | id-token: write
15 |
16 |
17 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19 | concurrency:
20 | group: pages
21 | cancel-in-progress: false
22 |
23 |
24 | jobs:
25 | build:
26 | name: Build
27 | runs-on: ubuntu-latest
28 | steps:
29 | - name: Checkout
30 | uses: actions/checkout@v4
31 | with:
32 | fetch-depth: 0 # Not needed if lastUpdated is not enabled
33 |
34 | - name: Use Node.js 20
35 | uses: actions/setup-node@v4
36 | with:
37 | node-version: 20
38 | cache: npm
39 |
40 | - name: Setup Pages
41 | uses: actions/configure-pages@v4
42 |
43 | - name: Install Dependencies
44 | run: npm ci
45 |
46 | - name: Build Documentation
47 | run: npm run build
48 |
49 | - name: Upload Artifact
50 | uses: actions/upload-pages-artifact@v3
51 | with:
52 | path: .vitepress/dist
53 |
54 |
55 | # Deployment job
56 | deploy:
57 | environment:
58 | name: github-pages
59 | url: ${{ steps.deployment.outputs.page_url }}
60 | needs: build
61 | runs-on: ubuntu-latest
62 | name: Deploy
63 | steps:
64 | - name: Deploy to GitHub Pages
65 | id: deployment
66 | uses: actions/deploy-pages@v4
67 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Dependencies
2 | /node_modules
3 |
4 | # Production
5 | .vitepress/dist
6 |
7 | # Generated files
8 | .cache-loader
9 | .vitepress/cache
10 |
11 | # Misc
12 | .DS_Store
13 | .env.local
14 | .env.development.local
15 | .env.test.local
16 | .env.production.local
17 |
18 | npm-debug.log*
19 | yarn-debug.log*
20 | yarn-error.log*
21 |
--------------------------------------------------------------------------------
/.vitepress/theme/index.ts:
--------------------------------------------------------------------------------
1 | import DefaultTheme from "vitepress/theme";
2 | import "./custom.css";
3 | import "virtual:group-icons.css";
4 |
5 |
6 | export default DefaultTheme;
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to BetterDiscord
2 |
3 | Thanks for taking the time to contribute!
4 |
5 | The following is a set of guidelines for contributing to BetterDiscord. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. These guidelines have been adapted from [Atom](https://github.com/atom/atom/blob/master/CONTRIBUTING.md).
6 |
7 |
8 | ## Code of Conduct
9 |
10 | See our [Code of Conduct](https://github.com/BetterDiscord/BetterDiscord/blob/main/CODE_OF_CONDUCT.md) page for details.
11 |
12 | ## What should I know before I get started?
13 |
14 | Review the project architecture found on the [README](./README.md) and familiarize yourself with the layout. Then check the [`package.json`](./package.json) to get familiar with the tech stack in use.
15 |
16 | ## How Can I Contribute?
17 |
18 | ### Reporting Bugs
19 |
20 | This section guides you through submitting a bug report for BetterDiscord. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
21 |
22 | Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one.
23 |
24 | #### Before Submitting A Bug Report
25 |
26 | * **Perform a [search](https://github.com/BetterDiscord/docs/issues)** to see if the problem has already been reported. If it has **and the issue is still open**, add a :+1: to the existing issue instead of opening a new one.
27 |
28 | #### How Do I Submit A (Good) Bug Report?
29 |
30 | Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined this is a new bug using the steps from above, create an issue and provide the following information.
31 |
32 | * **Use a clear and descriptive title** for the issue to identify the problem.
33 | * **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started Discord, e.g. which addons exactly you used, and what actions were taken. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you opened a menu, explain if you used the mouse, or a keyboard shortcut or something else entirely.
34 | * **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
35 | * **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
36 | * **Explain which behavior you expected to see instead and why.**
37 | * **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem.
38 |
39 |
40 | ### Suggesting Enhancements
41 |
42 | This section guides you through submitting an enhancement suggestion for BetterDiscord, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
43 |
44 | Before creating enhancement suggestions, please check [this list](#before-submitting-an-enhancement-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in the details including the steps that you imagine you would take if the feature you're requesting existed.
45 |
46 | #### Before Submitting An Enhancement Suggestion
47 |
48 | * **Check if there's already a plugin which provides that enhancement.**
49 | * **Perform a [cursory search](https://guides.github.com/features/issues/)** to see if the enhancement has already been suggested. If it has, add a :+1: to the existing issue instead of opening a new one.
50 |
51 | #### How Do I Submit A (Good) Enhancement Suggestion?
52 |
53 | Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined this is a new suggestion using the steps from above, create an issue and provide the following information:
54 |
55 | * **Use a clear and descriptive title** for the issue to identify the suggestion.
56 | * **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
57 | * **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
58 | * **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
59 | * **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of BetterDiscord which the suggestion is related to.
60 | * **Explain why this enhancement would be useful** to most BetterDiscord users and isn't something that can or should be implemented as a plugin.
61 |
62 | ### Your First Code Contribution
63 |
64 | > [!IMPORTANT]
65 | > If you've found typos, it's preferred to just open an issue rather than a single character pull request!
66 |
67 | Unsure where to begin contributing? You can start by looking through `help-wanted` issues or any issues labelled `can't reproduce`.
68 |
69 | ### Pull Requests
70 |
71 | Please follow these steps to have your contribution considered by the maintainers:
72 |
73 | 1. Use a pull request template, if one exists.
74 | 2. Follow the [styleguides](#styleguides)
75 | 3. After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing What if the status checks are failing?
If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.