From c1d2aeded5dadc978d2bb6d9e3e85da4a97f31b0 Mon Sep 17 00:00:00 2001 From: and <46562212+DevAndromeda@users.noreply.github.com> Date: Sun, 28 Nov 2021 13:42:25 +0545 Subject: [PATCH 1/2] docs: add notes to proxy example --- README.md | 4 ++++ docs/youtube/proxy.md | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 157e2e4..a0eeee6 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ $ npm install --save @discordjs/opus - Lyrics 📃 - Multiple sources support ✌ - Play in multiple servers at the same time 🚗 +- Does not inject anything to discord.js or your discord.js client ## [Documentation](https://discord-player.js.org) @@ -193,6 +194,9 @@ const player = new Player(client, { }); ``` +> You may also create a simple proxy server and forward requests through it. +> See **[https://github.com/http-party/node-http-proxy](https://github.com/http-party/node-http-proxy)** for more info. + ### Custom stream Engine Discord Player by default uses **[node-ytdl-core](https://github.com/fent/node-ytdl-core)** for youtube and some other extractors for other sources. diff --git a/docs/youtube/proxy.md b/docs/youtube/proxy.md index 35fe5a8..7254972 100644 --- a/docs/youtube/proxy.md +++ b/docs/youtube/proxy.md @@ -13,4 +13,7 @@ const player = new Player(client, { requestOptions: { agent } } }); -``` \ No newline at end of file +``` + +> You may also create a simple proxy server and forward requests through it. +> See **[https://github.com/http-party/node-http-proxy](https://github.com/http-party/node-http-proxy)** for more info. \ No newline at end of file From bfd206d5df31b9dd00d3d70116b5232dae2464e2 Mon Sep 17 00:00:00 2001 From: and <46562212+DevAndromeda@users.noreply.github.com> Date: Sun, 28 Nov 2021 13:43:35 +0545 Subject: [PATCH 2/2] refactor(PlayerError): return message on calling toJSON --- src/Structures/PlayerError.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Structures/PlayerError.ts b/src/Structures/PlayerError.ts index bce0fbc..da36da6 100644 --- a/src/Structures/PlayerError.ts +++ b/src/Structures/PlayerError.ts @@ -39,7 +39,12 @@ export class PlayerError extends Error { } toJSON() { - return { stack: this.stack, code: this.statusCode, created: this.createdTimestamp }; + return { + stack: this.stack, + code: this.statusCode, + message: this.message, + created: this.createdTimestamp + }; } toString() {