lavalink-client 2.10.2 → 2.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -6073,8 +6073,10 @@ var Player = class {
6073
6073
  * @returns
6074
6074
  */
6075
6075
  async connect() {
6076
- if (!this.options.voiceChannelId)
6077
- throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6076
+ if (!this.options.voiceChannelId) {
6077
+ if (this.voiceChannelId) this.options.voiceChannelId = this.voiceChannelId;
6078
+ else throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6079
+ }
6078
6080
  await this.LavalinkManager.options.sendToShard(this.guildId, {
6079
6081
  op: 4,
6080
6082
  d: {
@@ -6111,8 +6113,10 @@ var Player = class {
6111
6113
  * @returns
6112
6114
  */
6113
6115
  async disconnect(force = false) {
6114
- if (!force && !this.options.voiceChannelId)
6115
- throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6116
+ if (!force && !this.options.voiceChannelId) {
6117
+ if (this.voiceChannelId) this.options.voiceChannelId = this.voiceChannelId;
6118
+ else throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6119
+ }
6116
6120
  await this.LavalinkManager.options.sendToShard(this.guildId, {
6117
6121
  op: 4,
6118
6122
  d: {
package/dist/index.js CHANGED
@@ -6007,8 +6007,10 @@ var Player = class {
6007
6007
  * @returns
6008
6008
  */
6009
6009
  async connect() {
6010
- if (!this.options.voiceChannelId)
6011
- throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6010
+ if (!this.options.voiceChannelId) {
6011
+ if (this.voiceChannelId) this.options.voiceChannelId = this.voiceChannelId;
6012
+ else throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6013
+ }
6012
6014
  await this.LavalinkManager.options.sendToShard(this.guildId, {
6013
6015
  op: 4,
6014
6016
  d: {
@@ -6045,8 +6047,10 @@ var Player = class {
6045
6047
  * @returns
6046
6048
  */
6047
6049
  async disconnect(force = false) {
6048
- if (!force && !this.options.voiceChannelId)
6049
- throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6050
+ if (!force && !this.options.voiceChannelId) {
6051
+ if (this.voiceChannelId) this.options.voiceChannelId = this.voiceChannelId;
6052
+ else throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6053
+ }
6050
6054
  await this.LavalinkManager.options.sendToShard(this.guildId, {
6051
6055
  op: 4,
6052
6056
  d: {
package/dist/index.mjs CHANGED
@@ -6007,8 +6007,10 @@ var Player = class {
6007
6007
  * @returns
6008
6008
  */
6009
6009
  async connect() {
6010
- if (!this.options.voiceChannelId)
6011
- throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6010
+ if (!this.options.voiceChannelId) {
6011
+ if (this.voiceChannelId) this.options.voiceChannelId = this.voiceChannelId;
6012
+ else throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6013
+ }
6012
6014
  await this.LavalinkManager.options.sendToShard(this.guildId, {
6013
6015
  op: 4,
6014
6016
  d: {
@@ -6045,8 +6047,10 @@ var Player = class {
6045
6047
  * @returns
6046
6048
  */
6047
6049
  async disconnect(force = false) {
6048
- if (!force && !this.options.voiceChannelId)
6049
- throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6050
+ if (!force && !this.options.voiceChannelId) {
6051
+ if (this.voiceChannelId) this.options.voiceChannelId = this.voiceChannelId;
6052
+ else throw new RangeError("No Voice Channel id has been set. (player.options.voiceChannelId)");
6053
+ }
6050
6054
  await this.LavalinkManager.options.sendToShard(this.guildId, {
6051
6055
  op: 4,
6052
6056
  d: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lavalink-client",
3
- "version": "2.10.2",
3
+ "version": "2.10.3",
4
4
  "description": "Easy, flexible and feature-rich lavalink@v4 Client. Both for Beginners and Proficients. - Supports NodeLink@v3 too.",
5
5
  "keywords": [
6
6
  "advanced",