Skip to content

Commit 4c2dcc1

Browse files
committed
fix wrong example code.
1 parent 6e4f301 commit 4c2dcc1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/structures/Node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ export class LavalinkNode {
574574
*
575575
* @example
576576
* ```ts
577-
* player.node.destroy("custom Player Destroy Reason", true);
577+
* player.node.disconnect("Forcefully disconnect the connection to the node.");
578578
* ```
579579
*/
580580
public disconnect(disconnectReason?: DisconnectReasonsType) {

src/structures/Player.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -846,11 +846,15 @@ export class Player {
846846
}
847847

848848
/**
849-
* Move the player to a different node. If no node is provided, it will find the least used node that is not the same as the current node.
849+
* (Wrapper-FN for changeNode) Move the player to a different node. If no node is provided, it will find the least used node that is not the same as the current node.
850850
* @param node the id of the node to move to
851851
* @returns the player
852852
* @throws RangeError if there is no available nodes.
853853
* @throws Error if the node to move to is the same as the current node.
854+
* @example
855+
* ```ts
856+
* const newNodeMovedTo = await player.moveNode(); // no need to specify the new node, it will find a least used node automatically, but you can ofc. use a custom node id.
857+
* ```
854858
*/
855859
public async moveNode(node?: string) {
856860
try {
@@ -892,5 +896,3 @@ export class Player {
892896
} as PlayerJson
893897
}
894898
}
895-
896-

0 commit comments

Comments
 (0)