aqualink 2.3.1 → 2.3.2
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/build/structures/Aqua.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const { EventEmitter } = require("node:events");
|
|
3
2
|
const Node = require("./Node");
|
|
4
3
|
const Player = require("./Player");
|
|
5
4
|
const Track = require("./Track");
|
|
6
5
|
const { version: pkgVersion } = require("../../package.json");
|
|
7
6
|
const URL_REGEX = /^https?:\/\//;
|
|
7
|
+
const { EventEmitter } = require('eventemitter3');
|
|
8
8
|
|
|
9
9
|
class Aqua extends EventEmitter {
|
|
10
10
|
constructor(client, nodes, options = {}) {
|
|
@@ -29,7 +29,6 @@ class Aqua extends EventEmitter {
|
|
|
29
29
|
this.autoResume = options.autoResume ?? false;
|
|
30
30
|
this.infiniteReconnects = options.infiniteReconnects ?? false;
|
|
31
31
|
this.options = options;
|
|
32
|
-
this.setMaxListeners(0);
|
|
33
32
|
this._leastUsedCache = { nodes: [], timestamp: 0 };
|
|
34
33
|
}
|
|
35
34
|
|
package/build/structures/Node.js
CHANGED
|
@@ -166,12 +166,7 @@ class Node {
|
|
|
166
166
|
|
|
167
167
|
async connect() {
|
|
168
168
|
this.cleanupExistingConnection();
|
|
169
|
-
|
|
170
|
-
this.ws = new WebSocket(this.wsUrl, {
|
|
171
|
-
headers: this._constructHeaders(),
|
|
172
|
-
perMessageDeflate: false,
|
|
173
|
-
});
|
|
174
|
-
|
|
169
|
+
this.ws = new WebSocket(this.wsUrl, { headers: this._constructHeaders(), perMessageDeflate: false });
|
|
175
170
|
this.ws.once("open", this._onOpen.bind(this));
|
|
176
171
|
this.ws.once("error", this._onError.bind(this));
|
|
177
172
|
this.ws.on("message", this._onMessage.bind(this));
|
|
@@ -200,7 +195,7 @@ class Node {
|
|
|
200
195
|
|
|
201
196
|
if (clean) {
|
|
202
197
|
this.aqua.emit("nodeDestroy", this);
|
|
203
|
-
this.aqua.
|
|
198
|
+
this.aqua.destroyNode(this.name);
|
|
204
199
|
return;
|
|
205
200
|
}
|
|
206
201
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { EventEmitter } = require(
|
|
3
|
+
const { EventEmitter } = require('eventemitter3');
|
|
4
4
|
const Connection = require("./Connection");
|
|
5
5
|
const Queue = require("./Queue");
|
|
6
6
|
const Filters = require("./Filters");
|
|
@@ -57,14 +57,8 @@ class Player extends EventEmitter {
|
|
|
57
57
|
this.nowPlayingMessage = null;
|
|
58
58
|
this.isAutoplayEnabled = false;
|
|
59
59
|
this.isAutoplay = false;
|
|
60
|
-
|
|
61
|
-
this.
|
|
62
|
-
playerUpdate: this._handlePlayerUpdate.bind(this),
|
|
63
|
-
event: this._handleEvent.bind(this)
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
this.on("playerUpdate", this._boundHandlers.playerUpdate);
|
|
67
|
-
this.on("event", this._boundHandlers.event);
|
|
60
|
+
this.on("playerUpdate", this._handlePlayerUpdate);
|
|
61
|
+
this.on("event", this._handleEvent);
|
|
68
62
|
|
|
69
63
|
this._dataStore = null;
|
|
70
64
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aqualink",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "An Lavalink client, focused in pure performance and features",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"url": "https://github.com/ToddyTheNoobDud/AquaLink"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"ws": "^8.18.1"
|
|
44
|
+
"ws": "^8.18.1",
|
|
45
|
+
"eventemitter3": "^5.0.1"
|
|
45
46
|
},
|
|
46
47
|
"maintainers": [
|
|
47
48
|
{
|