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] 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() {