From 6398e460435e118b7e6d12a95b0dbb3faac6a8bb Mon Sep 17 00:00:00 2001 From: DD Date: Sat, 1 Oct 2022 16:40:24 +0300 Subject: [PATCH] chore(proxy-container): update README for proper request forwarding (#8692) * chore(proxy-container): update README for proper request forwarding * chore: remove unused import Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/proxy-container/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/proxy-container/README.md b/packages/proxy-container/README.md index ba54f54bc..9eeae0749 100644 --- a/packages/proxy-container/README.md +++ b/packages/proxy-container/README.md @@ -29,16 +29,25 @@ Use it: ```ts import { Client } from 'discord.js'; -import { ProxyAgent } from 'undici'; const client = new Client({ // other options, rest: { - agent: new ProxyAgent('https://localhost:8080'), + api: 'http://localhost:8080/api', }, }); ``` +Or with just `@discordjs/rest`: + +```ts +import { REST } from '@discordjs/rest'; + +const rest = new REST({ + api: 'http://localhost:8080/api', +}); +``` + ## Links - [Website](https://discord.js.org/) ([source](https://github.com/discordjs/website))