Skip to content

Commit

Permalink
refactor(Node): protect property for url and version
Browse files Browse the repository at this point in the history
  • Loading branch information
Fab1o0107 committed Dec 21, 2023
1 parent 3f844b9 commit d14e987
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ export class Node {
* @readonly
*/
public readonly name;
/**
* Websocket version this node will use.
* @readonly
*/
public readonly version: string = "/v4";
/** The number of reconnects to Lavalink. */
public reconnects = 0;
/** The state of this connection. */
Expand All @@ -104,17 +99,25 @@ export class Node {
public sessionId: string | null = null;
/**
* A URL of the Lavalink.
* @protected
* @readonly
* @internal
*/
public readonly url;
protected readonly url;
/**
* A credentials to access the Lavalink.
* @protected
* @readonly
* @internal
*/
protected readonly authorization;
/**
* Websocket version this node will use.
* @protected
* @readonly
* @internal
*/
protected readonly version: string = "/v4";
/**
* Boolean that represents if the node has initialized once.
* @private
Expand Down Expand Up @@ -144,11 +147,11 @@ export class Node {
manager: { enumerable: false, writable: false },
rest: { enumerable: true, writable: false },
name: { enumerable: true, writable: false },
url: { enumerable: true, writable: false },
authorization: { enumerable: false, writable: false },
version: { enumerable: true, writable: false },
initialized: { enumerable: false, writable: true },
destroyed: { enumerable: false, writable: true },
url: { enumerable: true, writable: false },
authorization: { enumerable: false, writable: false }
destroyed: { enumerable: false, writable: true }
});
}

Expand Down

0 comments on commit d14e987

Please sign in to comment.