lavalink-client 2.5.9 → 2.6.0

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.mjs CHANGED
@@ -4401,14 +4401,17 @@ var LavalinkManager = class extends EventEmitter2 {
4401
4401
  * @returns
4402
4402
  */
4403
4403
  applyOptions(options) {
4404
- this.options = {
4404
+ const optionsToAssign = {
4405
+ ...options,
4405
4406
  client: {
4406
4407
  ...options?.client,
4407
4408
  id: options?.client?.id,
4408
4409
  username: options?.client?.username ?? "lavalink-client"
4409
4410
  },
4410
4411
  sendToShard: options?.sendToShard,
4412
+ autoMove: options?.autoMove ?? false,
4411
4413
  nodes: options?.nodes,
4414
+ playerClass: options?.playerClass ?? Player,
4412
4415
  playerOptions: {
4413
4416
  applyVolumeAsFilter: options?.playerOptions?.applyVolumeAsFilter ?? false,
4414
4417
  clientBasedPositionUpdateInterval: options?.playerOptions?.clientBasedPositionUpdateInterval ?? 100,
@@ -4455,6 +4458,7 @@ var LavalinkManager = class extends EventEmitter2 {
4455
4458
  }
4456
4459
  }
4457
4460
  };
4461
+ this.options = optionsToAssign;
4458
4462
  return;
4459
4463
  }
4460
4464
  /**
@@ -4590,7 +4594,7 @@ var LavalinkManager = class extends EventEmitter2 {
4590
4594
  createPlayer(options) {
4591
4595
  const oldPlayer = this.getPlayer(options?.guildId);
4592
4596
  if (oldPlayer) return oldPlayer;
4593
- const newPlayer = new Player(options, this, true);
4597
+ const newPlayer = new this.options.playerClass(options, this, true);
4594
4598
  this.players.set(newPlayer.guildId, newPlayer);
4595
4599
  this.emit("playerCreate", newPlayer);
4596
4600
  return newPlayer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lavalink-client",
3
- "version": "2.5.9",
3
+ "version": "2.6.0",
4
4
  "description": "Easy, flexible and feature-rich lavalink@v4 Client. Both for Beginners and Proficients.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -72,5 +72,10 @@
72
72
  "engines": {
73
73
  "node": ">=18.0.0",
74
74
  "bun": ">=1.1.27"
75
+ },
76
+ "pnpm": {
77
+ "onlyBuiltDependencies": [
78
+ "esbuild"
79
+ ]
75
80
  }
76
81
  }