magmastream 2.9.0-dev.41 → 2.9.0-dev.42

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.d.ts CHANGED
@@ -1815,8 +1815,8 @@ interface PlayerOptions {
1815
1815
  textChannelId: string;
1816
1816
  /** The voice channel the Player belongs to. */
1817
1817
  voiceChannelId?: string;
1818
- /** The node the Player uses. */
1819
- node?: string;
1818
+ /** The node identifier the Player uses. */
1819
+ nodeIdentifier?: string;
1820
1820
  /** The initial volume the Player will use. */
1821
1821
  volume?: number;
1822
1822
  /** If the player should mute itself. */
@@ -498,7 +498,7 @@ class Manager extends events_1.EventEmitter {
498
498
  voiceChannelId: state.options.voiceChannelId,
499
499
  selfDeafen: state.options.selfDeafen,
500
500
  volume: lavaPlayer.volume || state.options.volume,
501
- node: nodeId,
501
+ nodeIdentifier: nodeId,
502
502
  };
503
503
  this.emit(Enums_1.ManagerEventTypes.Debug, `[MANAGER] Recreating player: ${state.guildId} from saved file: ${JSON.stringify(state.options)}`);
504
504
  const player = this.create(playerOptions);
@@ -696,7 +696,7 @@ class Manager extends events_1.EventEmitter {
696
696
  voiceChannelId: state.options.voiceChannelId,
697
697
  selfDeafen: state.options.selfDeafen,
698
698
  volume: lavaPlayer?.volume || state.options.volume,
699
- node: nodeId,
699
+ nodeIdentifier: nodeId,
700
700
  };
701
701
  this.emit(Enums_1.ManagerEventTypes.Debug, `[MANAGER] Recreating player: ${guildId} from Redis`);
702
702
  const player = this.create(playerOptions);
@@ -92,7 +92,7 @@ class Player {
92
92
  if (options.textChannelId)
93
93
  this.textChannelId = options.textChannelId;
94
94
  // Set the node to use, either the specified node or the first available node.
95
- const node = this.manager.nodes.get(options.node);
95
+ const node = this.manager.nodes.get(options.nodeIdentifier);
96
96
  this.node = node || this.manager.useableNode;
97
97
  // If no node is available, throw an error.
98
98
  if (!this.node)
@@ -862,7 +862,7 @@ class Player {
862
862
  if (force && newPlayer) {
863
863
  await newPlayer.destroy();
864
864
  }
865
- newOptions.node = newOptions.node ?? this.options.node;
865
+ newOptions.nodeIdentifier = newOptions.nodeIdentifier ?? this.options.nodeIdentifier;
866
866
  newOptions.selfDeafen = newOptions.selfDeafen ?? oldPlayerProperties.selfDeafen;
867
867
  newOptions.selfMute = newOptions.selfMute ?? oldPlayerProperties.selfMute;
868
868
  newOptions.volume = newOptions.volume ?? oldPlayerProperties.volume;
@@ -12,7 +12,7 @@ function playerCheck(options) {
12
12
  throw new TypeError("PlayerOptions must not be empty.");
13
13
  }
14
14
  // Get the guild ID, node, selfDeafen, selfMute, textChannelId, voiceChannelId, and volume from the options.
15
- const { guildId, node, selfDeafen, selfMute, textChannelId, voiceChannelId, volume } = options;
15
+ const { guildId, nodeIdentifier, selfDeafen, selfMute, textChannelId, voiceChannelId, volume } = options;
16
16
  // Validate the guild ID option
17
17
  // The guild ID option must be a non-empty string.
18
18
  if (!/^\d+$/.test(guildId)) {
@@ -20,8 +20,8 @@ function playerCheck(options) {
20
20
  }
21
21
  // Validate the node option
22
22
  // The node option must be a string.
23
- if (node && typeof node !== "string") {
24
- throw new TypeError('Player option "node" must be a non-empty string.');
23
+ if (nodeIdentifier && typeof nodeIdentifier !== "string") {
24
+ throw new TypeError('Player option "nodeIdentifier" must be a non-empty string.');
25
25
  }
26
26
  // Validate the selfDeafen option
27
27
  // The selfDeafen option must be a boolean.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magmastream",
3
- "version": "2.9.0-dev.41",
3
+ "version": "2.9.0-dev.42",
4
4
  "description": "A user-friendly Lavalink client designed for NodeJS.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",