Skip to content

feat: add page about setting up with a proxy #1623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

favna
Copy link

@favna favna commented May 13, 2025

Please describe the changes this PR makes and why it should be merged:

I encountered this requirement when trying to deploy a Discord bot on my workplace's Kubernetes cluster. After I found a solution in #djs-questions (https://discord.com/channels/222078108977594368/1358110617831211189) I decided to adopt it a bit differently and make a guide page about it so the info can be read by others as well.

Note that the reason I did not opt for using node-global-proxy as the linked post from #djs-questions uses is because that library is compiled from TypeScript to Node <10 and is poorly optimised for ESM as a result of that in that it requires either require syntax, or import { default as proxy } from 'node-global-proxy';, which are both ESLint rule violations when using Discordjs' own eslint-config-neon. Specifically, the former because it's require-syntax, and the latter because of unicorn/no-named-defaults. Since the library itself is just a tiny wrapper around global-agent (and global-tunnel-ng for Node versions < 10) and Discord.js does not target such old Node versions, we can instead recommend to use global-agent directly.

almostSouji added a commit to discordjs/discord.js that referenced this pull request Jul 10, 2025
@almostSouji
Copy link
Member

applied to the legacy portion of the next guide iteration

kodiakhq bot pushed a commit to discordjs/discord.js that referenced this pull request Jul 12, 2025
* chore: remove await wait placeholder

prefer using an explanatory placeholder rather than this artificial
example
original issue: https://github.com/discordjs/guide/issues/1360

* chore: remove implicit grant guide and add disclaimer

issue: https://github.com/discordjs/guide/issues/1370/
pr: discordjs/guide#1543

* chore(sharding): improve broadcast sample and use of context argument

original PR: discordjs/guide#1624

* feat: add page about setup with proxy

original PR: discordjs/guide#1623

* chore: clarify hiding of commands

original PR: discordjs/guide#1617

* feat(voice): seeking

original PR: discordjs/guide#1483

* chore(oauth2): typo

* chore: align with rest of the guide

remove abstraction layers in ws proxy handling in favour of directly setting globals

* chore: branding over grammar

* Apply suggestions from code review

Co-authored-by: Qjuh <[email protected]>

* chore: remove now obsolete example explanation from comments

---------

Co-authored-by: Qjuh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants