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

Open
wants to merge 2 commits into
base: main
Choose a base branch
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.

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.

1 participant