lavalink-client 2.9.4 → 2.9.6

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.cts CHANGED
@@ -952,6 +952,8 @@ interface VoiceServer {
952
952
  guild_id: string;
953
953
  /** Server Endpoint */
954
954
  endpoint: string;
955
+ /** Voice Channel Id (Lavalink v4 DAVE support) */
956
+ channel_id?: string;
955
957
  }
956
958
  interface VoicePacket {
957
959
  /** Voice Packet Keys to send */
@@ -4096,6 +4098,11 @@ declare class LavalinkManager<CustomPlayerT extends Player = Player> extends Eve
4096
4098
  * @param eventData event data
4097
4099
  */
4098
4100
  private _emitDebugEvent;
4101
+ private static readonly _noAudioDebugPrefix;
4102
+ /**
4103
+ * Emits NoAudioDebug and optionally logs to console when debugOptions.noAudio is enabled.
4104
+ */
4105
+ private _debugNoAudio;
4099
4106
  /**
4100
4107
  * Create the Lavalink Manager
4101
4108
  * @param options
package/dist/index.d.ts CHANGED
@@ -952,6 +952,8 @@ interface VoiceServer {
952
952
  guild_id: string;
953
953
  /** Server Endpoint */
954
954
  endpoint: string;
955
+ /** Voice Channel Id (Lavalink v4 DAVE support) */
956
+ channel_id?: string;
955
957
  }
956
958
  interface VoicePacket {
957
959
  /** Voice Packet Keys to send */
@@ -4096,6 +4098,11 @@ declare class LavalinkManager<CustomPlayerT extends Player = Player> extends Eve
4096
4098
  * @param eventData event data
4097
4099
  */
4098
4100
  private _emitDebugEvent;
4101
+ private static readonly _noAudioDebugPrefix;
4102
+ /**
4103
+ * Emits NoAudioDebug and optionally logs to console when debugOptions.noAudio is enabled.
4104
+ */
4105
+ private _debugNoAudio;
4099
4106
  /**
4100
4107
  * Create the Lavalink Manager
4101
4108
  * @param options
package/dist/index.js CHANGED
@@ -1,69 +1,5 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/index.ts
30
- var index_exports = {};
31
- __export(index_exports, {
32
- DebugEvents: () => DebugEvents,
33
- DefaultQueueStore: () => DefaultQueueStore,
34
- DefaultSources: () => DefaultSources,
35
- DestroyReasons: () => DestroyReasons,
36
- DisconnectReasons: () => DisconnectReasons,
37
- EQList: () => EQList,
38
- FilterManager: () => FilterManager,
39
- LavalinkManager: () => LavalinkManager,
40
- LavalinkNode: () => LavalinkNode,
41
- LavalinkPlugins: () => LavalinkPlugins,
42
- ManagerUtils: () => ManagerUtils,
43
- MiniMap: () => MiniMap,
44
- NodeLinkExclusiveEvents: () => NodeLinkExclusiveEvents,
45
- NodeLinkNode: () => NodeLinkNode,
46
- NodeManager: () => NodeManager,
47
- NodeSymbol: () => NodeSymbol,
48
- Player: () => Player,
49
- Queue: () => Queue,
50
- QueueSaver: () => QueueSaver,
51
- QueueSymbol: () => QueueSymbol,
52
- RecommendationsStrings: () => RecommendationsStrings,
53
- ReconnectionState: () => ReconnectionState,
54
- SourceLinksRegexes: () => SourceLinksRegexes,
55
- TrackSymbol: () => TrackSymbol,
56
- UnresolvedTrackSymbol: () => UnresolvedTrackSymbol,
57
- audioOutputsData: () => audioOutputsData,
58
- parseLavalinkConnUrl: () => parseLavalinkConnUrl,
59
- queueTrackEnd: () => queueTrackEnd,
60
- safeStringify: () => safeStringify,
61
- validSponsorBlocks: () => validSponsorBlocks
62
- });
63
- module.exports = __toCommonJS(index_exports);
64
-
65
1
  // src/structures/LavalinkManager.ts
66
- var import_node_events2 = require("events");
2
+ import { EventEmitter as EventEmitter2 } from "events";
67
3
 
68
4
  // src/structures/Constants.ts
69
5
  var DebugEvents = /* @__PURE__ */ ((DebugEvents2) => {
@@ -404,11 +340,11 @@ var NodeLinkExclusiveEvents = [
404
340
  ];
405
341
 
406
342
  // src/structures/NodeManager.ts
407
- var import_node_events = require("events");
343
+ import { EventEmitter } from "events";
408
344
 
409
345
  // src/structures/Node.ts
410
- var import_node_path = require("path");
411
- var import_ws = __toESM(require("ws"), 1);
346
+ import { isAbsolute } from "path";
347
+ import WebSocket from "ws";
412
348
 
413
349
  // src/structures/Types/Node.ts
414
350
  var ReconnectionState = /* @__PURE__ */ ((ReconnectionState2) => {
@@ -420,8 +356,8 @@ var ReconnectionState = /* @__PURE__ */ ((ReconnectionState2) => {
420
356
  })(ReconnectionState || {});
421
357
 
422
358
  // src/structures/Utils.ts
423
- var import_node_url = require("url");
424
- var import_types = require("util/types");
359
+ import { URL as URL2 } from "url";
360
+ import { isRegExp } from "util/types";
425
361
 
426
362
  // src/structures/LavalinkManagerStatics.ts
427
363
  var DefaultSources = {
@@ -591,7 +527,7 @@ var escapeRegExp = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
591
527
  function parseLavalinkConnUrl(connectionUrl) {
592
528
  if (!connectionUrl.startsWith("lavalink://"))
593
529
  throw new Error(`ConnectionUrl (${connectionUrl}) must start with 'lavalink://'`);
594
- const parsed = new import_node_url.URL(connectionUrl);
530
+ const parsed = new URL2(connectionUrl);
595
531
  return {
596
532
  authorization: parsed.password,
597
533
  id: parsed.username,
@@ -856,7 +792,7 @@ var ManagerUtils = class {
856
792
  });
857
793
  }
858
794
  if (this.LavalinkManager.options?.linksBlacklist.some(
859
- (v) => typeof v === "string" && queryString.toLowerCase().includes(v.toLowerCase()) || (0, import_types.isRegExp)(v) && v.test(queryString)
795
+ (v) => typeof v === "string" && queryString.toLowerCase().includes(v.toLowerCase()) || isRegExp(v) && v.test(queryString)
860
796
  )) {
861
797
  throw new Error(`Query string contains a link / word which is blacklisted.`);
862
798
  }
@@ -873,7 +809,7 @@ var ManagerUtils = class {
873
809
  });
874
810
  }
875
811
  if (!this.LavalinkManager.options?.linksWhitelist.some(
876
- (v) => typeof v === "string" && queryString.toLowerCase().includes(v.toLowerCase()) || (0, import_types.isRegExp)(v) && v.test(queryString)
812
+ (v) => typeof v === "string" && queryString.toLowerCase().includes(v.toLowerCase()) || isRegExp(v) && v.test(queryString)
877
813
  )) {
878
814
  throw new Error(`Query string contains a link / word which isn't whitelisted.`);
879
815
  }
@@ -1349,7 +1285,7 @@ var LavalinkNode = class _LavalinkNode {
1349
1285
  * ```
1350
1286
  */
1351
1287
  get connected() {
1352
- return this.socket && this.socket.readyState === import_ws.default.OPEN;
1288
+ return this.socket && this.socket.readyState === WebSocket.OPEN;
1353
1289
  }
1354
1290
  /**
1355
1291
  * Returns the current ConnectionStatus
@@ -1669,7 +1605,7 @@ var LavalinkNode = class _LavalinkNode {
1669
1605
  headers["Session-Id"] = this.options.sessionId || sessionId;
1670
1606
  this.sessionId = this.options.sessionId || sessionId;
1671
1607
  }
1672
- this.socket = new import_ws.default(
1608
+ this.socket = new WebSocket(
1673
1609
  `ws${this.options.secure ? "s" : ""}://${this.options.host}:${this.options.port}/v4/websocket`,
1674
1610
  { headers }
1675
1611
  );
@@ -2623,7 +2559,7 @@ var LavalinkNode = class _LavalinkNode {
2623
2559
  player.connected = payload.state.connected;
2624
2560
  player.ping.ws = payload.state.ping >= 0 ? payload.state.ping : player.ping.ws <= 0 && player.connected ? null : player.ping.ws || 0;
2625
2561
  if (!player.createdTimeStamp && payload.state.time) player.createdTimeStamp = payload.state.time;
2626
- if (player.filterManager.filterUpdatedState === true && ((player.queue.current?.info?.duration || 0) <= (player.LavalinkManager.options.advancedOptions.maxFilterFixDuration || 6e5) || player.queue.current?.info?.uri && (0, import_node_path.isAbsolute)(player.queue.current?.info?.uri))) {
2562
+ if (player.filterManager.filterUpdatedState === true && ((player.queue.current?.info?.duration || 0) <= (player.LavalinkManager.options.advancedOptions.maxFilterFixDuration || 6e5) || player.queue.current?.info?.uri && isAbsolute(player.queue.current?.info?.uri))) {
2627
2563
  player.filterManager.filterUpdatedState = false;
2628
2564
  this._emitDebugEvent("PlayerUpdateFilterFixApply" /* PlayerUpdateFilterFixApply */, {
2629
2565
  state: "log",
@@ -3428,7 +3364,7 @@ var NodeLinkNode = class extends LavalinkNode {
3428
3364
  LavalinkNode._NodeLinkClass = NodeLinkNode;
3429
3365
 
3430
3366
  // src/structures/NodeManager.ts
3431
- var NodeManager = class extends import_node_events.EventEmitter {
3367
+ var NodeManager = class extends EventEmitter {
3432
3368
  /**
3433
3369
  * Emit an event
3434
3370
  * @param event The event to emit
@@ -6110,7 +6046,7 @@ var Player = class {
6110
6046
  };
6111
6047
 
6112
6048
  // src/structures/LavalinkManager.ts
6113
- var LavalinkManager = class extends import_node_events2.EventEmitter {
6049
+ var LavalinkManager = class _LavalinkManager extends EventEmitter2 {
6114
6050
  /**
6115
6051
  * Emit an event
6116
6052
  * @param event The event to emit
@@ -6279,6 +6215,17 @@ var LavalinkManager = class extends import_node_events2.EventEmitter {
6279
6215
  if (!this.options?.advancedOptions?.enableDebugEvents) return;
6280
6216
  this.emit("debug", name, eventData);
6281
6217
  }
6218
+ static _noAudioDebugPrefix = "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, ";
6219
+ /**
6220
+ * Emits NoAudioDebug and optionally logs to console when debugOptions.noAudio is enabled.
6221
+ */
6222
+ _debugNoAudio(state, functionLayer, messages, ...consoleArgs) {
6223
+ this._emitDebugEvent("NoAudioDebug" /* NoAudioDebug */, { state, functionLayer, message: messages.message });
6224
+ if (this.options?.advancedOptions?.debugOptions?.noAudio === true) {
6225
+ const consoleMsg = messages.consoleMessage ?? messages.message;
6226
+ console.debug(_LavalinkManager._noAudioDebugPrefix + consoleMsg, ...consoleArgs);
6227
+ }
6228
+ }
6282
6229
  /**
6283
6230
  * Create the Lavalink Manager
6284
6231
  * @param options
@@ -6510,28 +6457,22 @@ var LavalinkManager = class extends import_node_events2.EventEmitter {
6510
6457
  */
6511
6458
  async sendRawData(data) {
6512
6459
  if (!this.initiated) {
6513
- this._emitDebugEvent("NoAudioDebug" /* NoAudioDebug */, {
6514
- state: "log",
6460
+ this._debugNoAudio("log", "LavalinkManager > sendRawData()", {
6515
6461
  message: "Manager is not initated yet",
6516
- functionLayer: "LavalinkManager > sendRawData()"
6462
+ consoleMessage: "manager is not initated yet"
6517
6463
  });
6518
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6519
- console.debug(
6520
- "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, manager is not initated yet"
6521
- );
6522
6464
  return;
6523
6465
  }
6524
6466
  if (!("t" in data)) {
6525
- this._emitDebugEvent("NoAudioDebug" /* NoAudioDebug */, {
6526
- state: "error",
6527
- message: "No 't' in payload-data of the raw event:",
6528
- functionLayer: "LavalinkManager > sendRawData()"
6529
- });
6530
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6531
- console.debug(
6532
- "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, no 't' in payload-data of the raw event:",
6533
- data
6534
- );
6467
+ this._debugNoAudio(
6468
+ "error",
6469
+ "LavalinkManager > sendRawData()",
6470
+ {
6471
+ message: "No 't' in payload-data of the raw event:",
6472
+ consoleMessage: "no 't' in payload-data of the raw event:"
6473
+ },
6474
+ data
6475
+ );
6535
6476
  return;
6536
6477
  }
6537
6478
  if ("CHANNEL_DELETE" === data.t) {
@@ -6544,132 +6485,94 @@ var LavalinkManager = class extends import_node_events2.EventEmitter {
6544
6485
  if (["VOICE_STATE_UPDATE", "VOICE_SERVER_UPDATE"].includes(data.t)) {
6545
6486
  const update = "d" in data ? data.d : data;
6546
6487
  if (!update) {
6547
- this._emitDebugEvent("NoAudioDebug" /* NoAudioDebug */, {
6548
- state: "warn",
6549
- message: `No Update data found in payload :: ${safeStringify(data, 2)}`,
6550
- functionLayer: "LavalinkManager > sendRawData()"
6551
- });
6552
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6553
- console.debug(
6554
- "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, no update data found in payload:",
6555
- data
6556
- );
6488
+ this._debugNoAudio(
6489
+ "warn",
6490
+ "LavalinkManager > sendRawData()",
6491
+ {
6492
+ message: `No Update data found in payload :: ${safeStringify(data, 2)}`,
6493
+ consoleMessage: "no update data found in payload:"
6494
+ },
6495
+ data
6496
+ );
6557
6497
  return;
6558
6498
  }
6559
6499
  if (!("token" in update) && !("session_id" in update)) {
6560
- this._emitDebugEvent("NoAudioDebug" /* NoAudioDebug */, {
6561
- state: "error",
6562
- message: `No 'token' nor 'session_id' found in payload :: ${safeStringify(data, 2)}`,
6563
- functionLayer: "LavalinkManager > sendRawData()"
6564
- });
6565
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6566
- console.debug(
6567
- "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, no 'token' nor 'session_id' found in payload:",
6568
- data
6569
- );
6500
+ this._debugNoAudio(
6501
+ "error",
6502
+ "LavalinkManager > sendRawData()",
6503
+ {
6504
+ message: `No 'token' nor 'session_id' found in payload :: ${safeStringify(data, 2)}`,
6505
+ consoleMessage: "no 'token' nor 'session_id' found in payload:"
6506
+ },
6507
+ data
6508
+ );
6570
6509
  return;
6571
6510
  }
6572
6511
  const player = this.getPlayer(update.guild_id);
6573
6512
  if (!player) {
6574
- this._emitDebugEvent("NoAudioDebug" /* NoAudioDebug */, {
6575
- state: "warn",
6576
- message: `No Lavalink Player found via key: 'guild_id' of update-data :: ${safeStringify(update, 2)}`,
6577
- functionLayer: "LavalinkManager > sendRawData()"
6578
- });
6579
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6580
- console.debug(
6581
- "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, No Lavalink Player found via key: 'guild_id' of update-data:",
6582
- update
6583
- );
6513
+ this._debugNoAudio(
6514
+ "warn",
6515
+ "LavalinkManager > sendRawData()",
6516
+ {
6517
+ message: `No Lavalink Player found via key: 'guild_id' of update-data :: ${safeStringify(update, 2)}`,
6518
+ consoleMessage: "No Lavalink Player found via key: 'guild_id' of update-data:"
6519
+ },
6520
+ update
6521
+ );
6584
6522
  return;
6585
6523
  }
6586
6524
  if (player.get("internal_destroystatus") === true) {
6587
- this._emitDebugEvent("NoAudioDebug" /* NoAudioDebug */, {
6588
- state: "warn",
6589
- message: `Player is in a destroying state. can't signal the voice states`,
6590
- functionLayer: "LavalinkManager > sendRawData()"
6525
+ this._debugNoAudio("warn", "LavalinkManager > sendRawData()", {
6526
+ message: "Player is in a destroying state. can't signal the voice states"
6591
6527
  });
6592
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6593
- console.debug(
6594
- "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, Player is in a destroying state. can't signal the voice states"
6595
- );
6596
6528
  return;
6597
6529
  }
6598
6530
  if ("token" in update) {
6599
6531
  if (!player.node?.sessionId) throw new Error("Lavalink Node is either not ready or not up to date");
6600
6532
  const sessionId2Use = player.voice?.sessionId || ("sessionId" in update ? update.sessionId : void 0);
6601
6533
  const channelId2Use = player.voice?.channelId || ("channel_id" in update ? update.channel_id : void 0);
6534
+ const voiceData = {
6535
+ token: update.token,
6536
+ endpoint: update.endpoint,
6537
+ sessionId: sessionId2Use,
6538
+ channelId: channelId2Use
6539
+ };
6602
6540
  if (!sessionId2Use) {
6603
- this.emit("debug", "NoAudioDebug" /* NoAudioDebug */, {
6604
- state: "error",
6605
- message: `Can't send updatePlayer for voice token session - Missing sessionId :: ${safeStringify({ voice: { token: update.token, endpoint: update.endpoint, sessionId: sessionId2Use, channelId: channelId2Use }, update, playerVoice: player.voice }, 2)}`,
6606
- functionLayer: "LavalinkManager > sendRawData()"
6607
- });
6608
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6609
- console.debug(
6610
- "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, Can't send updatePlayer for voice token session - Missing sessionId",
6611
- {
6612
- voice: {
6613
- token: update.token,
6614
- endpoint: update.endpoint,
6615
- sessionId: sessionId2Use,
6616
- channelId: channelId2Use
6617
- },
6618
- update,
6619
- playerVoice: player.voice
6620
- }
6621
- );
6541
+ this._debugNoAudio(
6542
+ "error",
6543
+ "LavalinkManager > sendRawData()",
6544
+ {
6545
+ message: `Can't send updatePlayer for voice token session - Missing sessionId :: ${safeStringify({ voice: voiceData, update, playerVoice: player.voice }, 2)}`,
6546
+ consoleMessage: "Can't send updatePlayer for voice token session - Missing sessionId"
6547
+ },
6548
+ { voice: voiceData, update, playerVoice: player.voice }
6549
+ );
6622
6550
  } else if (!channelId2Use) {
6623
- this.emit("debug", "NoAudioDebug" /* NoAudioDebug */, {
6624
- state: "error",
6625
- message: `Can't send updatePlayer for voice token session - Missing channelId :: ${safeStringify({ voice: { token: update.token, endpoint: update.endpoint, sessionId: sessionId2Use, channelId: channelId2Use }, update, playerVoice: player.voice }, 2)}`,
6626
- functionLayer: "LavalinkManager > sendRawData()"
6627
- });
6628
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6629
- console.debug(
6630
- "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, Can't send updatePlayer for voice token session - Missing channelId",
6631
- {
6632
- voice: {
6633
- token: update.token,
6634
- endpoint: update.endpoint,
6635
- sessionId: sessionId2Use,
6636
- channelId: channelId2Use
6637
- },
6638
- update,
6639
- playerVoice: player.voice
6640
- }
6641
- );
6551
+ this._debugNoAudio(
6552
+ "error",
6553
+ "LavalinkManager > sendRawData()",
6554
+ {
6555
+ message: `Can't send updatePlayer for voice token session - Missing channelId :: ${safeStringify({ voice: voiceData, update, playerVoice: player.voice }, 2)}`,
6556
+ consoleMessage: "Can't send updatePlayer for voice token session - Missing channelId"
6557
+ },
6558
+ { voice: voiceData, update, playerVoice: player.voice }
6559
+ );
6642
6560
  } else {
6643
6561
  await player.node.updatePlayer({
6644
6562
  guildId: player.guildId,
6645
6563
  playerOptions: {
6646
- voice: {
6647
- token: update.token,
6648
- endpoint: update.endpoint,
6649
- sessionId: sessionId2Use,
6650
- channelId: channelId2Use
6651
- }
6564
+ voice: voiceData
6652
6565
  }
6653
6566
  });
6654
- this._emitDebugEvent("NoAudioDebug" /* NoAudioDebug */, {
6655
- state: "log",
6656
- message: `Sent updatePlayer for voice token session :: ${safeStringify({ voice: { token: update.token, endpoint: update.endpoint, sessionId: sessionId2Use, channelId: channelId2Use }, update, playerVoice: player.voice }, 2)}`,
6657
- functionLayer: "LavalinkManager > sendRawData()"
6658
- });
6659
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6660
- console.debug(
6661
- "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, Sent updatePlayer for voice token session",
6662
- {
6663
- voice: {
6664
- token: update.token,
6665
- endpoint: update.endpoint,
6666
- sessionId: sessionId2Use,
6667
- channelId: channelId2Use
6668
- },
6669
- playerVoice: player.voice,
6670
- update
6671
- }
6672
- );
6567
+ this._debugNoAudio(
6568
+ "log",
6569
+ "LavalinkManager > sendRawData()",
6570
+ {
6571
+ message: `Sent updatePlayer for voice token session :: ${safeStringify({ voice: voiceData, update, playerVoice: player.voice }, 2)}`,
6572
+ consoleMessage: "Sent updatePlayer for voice token session"
6573
+ },
6574
+ { voice: voiceData, playerVoice: player.voice, update }
6575
+ );
6673
6576
  }
6674
6577
  return;
6675
6578
  }
@@ -6681,36 +6584,30 @@ var LavalinkManager = class extends import_node_events2.EventEmitter {
6681
6584
  update.user_id
6682
6585
  );
6683
6586
  }
6684
- this._emitDebugEvent("NoAudioDebug" /* NoAudioDebug */, {
6685
- state: "warn",
6686
- message: `voice update user is not equal to provided client id of the LavalinkManager.options.client.id :: user: "${update.user_id}" manager client id: "${this.options?.client.id}"`,
6687
- functionLayer: "LavalinkManager > sendRawData()"
6688
- });
6689
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6690
- console.debug(
6691
- "Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, voice update user is not equal to provided client id of the manageroptions#client#id",
6692
- "user:",
6693
- update.user_id,
6694
- "manager client id:",
6695
- this.options?.client.id
6696
- );
6587
+ this._debugNoAudio(
6588
+ "warn",
6589
+ "LavalinkManager > sendRawData()",
6590
+ {
6591
+ message: `voice update user is not equal to provided client id of the LavalinkManager.options.client.id :: user: "${update.user_id}" manager client id: "${this.options?.client.id}"`,
6592
+ consoleMessage: "voice update user is not equal to provided client id of the manageroptions#client#id"
6593
+ },
6594
+ "user:",
6595
+ update.user_id,
6596
+ "manager client id:",
6597
+ this.options?.client.id
6598
+ );
6697
6599
  return;
6698
6600
  }
6699
6601
  if (update.channel_id) {
6700
6602
  if (player.voiceChannelId !== update.channel_id)
6701
6603
  this.emit("playerMove", player, player.voiceChannelId, update.channel_id);
6702
6604
  player.voice.sessionId = update.session_id || player.voice.sessionId;
6703
- player.voice.channelId = update.channel_id;
6605
+ player.voice.channelId = update.channel_id || player.voice.channelId;
6704
6606
  if (!player.voice.sessionId) {
6705
- this._emitDebugEvent("NoAudioDebug" /* NoAudioDebug */, {
6706
- state: "warn",
6607
+ this._debugNoAudio("warn", "LavalinkManager > sendRawData()", {
6707
6608
  message: `Function to assing sessionId provided, but no found in Payload: ${safeStringify({ update, playerVoice: player.voice }, 2)}`,
6708
- functionLayer: "LavalinkManager > sendRawData()"
6609
+ consoleMessage: `Function to assing sessionId provided, but no found in Payload: ${safeStringify(update, 2)}`
6709
6610
  });
6710
- if (this.options?.advancedOptions?.debugOptions?.noAudio === true)
6711
- console.debug(
6712
- `Lavalink-Client-Debug | NO-AUDIO [::] sendRawData function, Function to assing sessionId provided, but no found in Payload: ${safeStringify(update, 2)}`
6713
- );
6714
6611
  }
6715
6612
  player.voiceChannelId = update.channel_id;
6716
6613
  player.options.voiceChannelId = update.channel_id;
@@ -6776,8 +6673,7 @@ var LavalinkManager = class extends import_node_events2.EventEmitter {
6776
6673
  }
6777
6674
  }
6778
6675
  };
6779
- // Annotate the CommonJS export names for ESM import in node:
6780
- 0 && (module.exports = {
6676
+ export {
6781
6677
  DebugEvents,
6782
6678
  DefaultQueueStore,
6783
6679
  DefaultSources,
@@ -6808,4 +6704,4 @@ var LavalinkManager = class extends import_node_events2.EventEmitter {
6808
6704
  queueTrackEnd,
6809
6705
  safeStringify,
6810
6706
  validSponsorBlocks
6811
- });
6707
+ };