reconnect() {
    if (this.remainingTries !== 0) {
      this.remainingTries -= 1;
      this.status = Status.RECONNECTING;
      try {
        this.connect();
        clearTimeout(this.reconnectTimeout);
      } catch (e) {
        this.manager.emit("socketError", this, e);
        this.reconnectTimeout = setTimeout(() => {
          this.reconnect();
        }, this.reconnection.delay ?? 15000);
      }
    } else {
      this.status = Status.DISCONNECTED;
      this.manager.emit(
        "socketDisconnect",
        this,
        "Ran out of reconnect tries.",
      );
    }
  }
/**
   * Reconnect to the lavalink node.
   */
Reconnect to the lavalink node.
Reconnect to the lavalink node .
reconnect() {
    if (this.remainingTries !== 0) {
      this.remainingTries -= 1;
      this.status = Status.RECONNECTING;
      try {
        this.connect();
        clearTimeout(this.reconnectTimeout);
      } catch (e) {
        this.manager.emit("socketError", this, e);
        this.reconnectTimeout = setTimeout(() => {
          this.reconnect();
        }, this.reconnection.delay ?? 15000);
      }
    } else {
      this.status = Status.DISCONNECTED;
      this.manager.emit(
        "socketDisconnect",
        this,
        "Ran out of reconnect tries.",
      );
    }
  }
reconnect ( ) { if ( this . remainingTries !== 0 ) { this . remainingTries -= 1 ; this . status = Status . RECONNECTING ; try { this . connect ( ) ; clearTimeout ( this . reconnectTimeout ) ; } catch ( e ) { this . manager . emit ( "socketError" , this , e ) ; this . reconnectTimeout = setTimeout ( ( ) => { this . reconnect ( ) ; } , this . reconnection . delay ?? 15000 ) ; } } else { this . status = Status . DISCONNECTED ; this . manager . emit ( "socketDisconnect" , this , "Ran out of reconnect tries." , ) ; } }
Reconnect to the lavalink node.
Reconnect to the lavalink node .