aqualink 1.8.1-beta3 → 1.8.1-beta4
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/README.md +4 -3
- package/build/structures/Player.js +9 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -31,9 +31,10 @@ This code is based in riffy, but its an 100% Rewrite made from scratch...
|
|
|
31
31
|
|
|
32
32
|
# Brick by brick, 1.8.0 Update (yay)
|
|
33
33
|
|
|
34
|
-
### 1.8.1-
|
|
35
|
-
- Use pool for connections (Experimental, help me improve it.)
|
|
36
|
-
-
|
|
34
|
+
### 1.8.1-beta4 Update:
|
|
35
|
+
- Use pool for connections (Experimental, help me improve it. Undici pool)
|
|
36
|
+
- Default will not leave the VC anymore (leaveOnEnd: false default)
|
|
37
|
+
- Misc optimizations on node and player
|
|
37
38
|
|
|
38
39
|
### 1.8.0
|
|
39
40
|
- Misc changes on FetchImage (improves the overall checking and speed)
|
|
@@ -45,11 +45,15 @@ class Player extends EventEmitter {
|
|
|
45
45
|
this.nowPlayingMessage = null;
|
|
46
46
|
this.previousTracks = [];
|
|
47
47
|
this.shouldDeleteMessage = options.shouldDeleteMessage ?? false;
|
|
48
|
-
this.leaveOnEnd = options.leaveOnEnd ??
|
|
48
|
+
this.leaveOnEnd = options.leaveOnEnd ?? false;
|
|
49
49
|
|
|
50
50
|
this.onPlayerUpdate = ({ state } = {}) => {
|
|
51
51
|
if (!state) return;
|
|
52
|
-
|
|
52
|
+
for (const key in state) {
|
|
53
|
+
if (state.hasOwnProperty(key)) {
|
|
54
|
+
this[key] = state[key];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
53
57
|
this.aqua.emit("playerUpdate", this, { state });
|
|
54
58
|
};
|
|
55
59
|
this.handleEvent = async (payload) => {
|
|
@@ -64,7 +68,6 @@ class Player extends EventEmitter {
|
|
|
64
68
|
};
|
|
65
69
|
this.on("playerUpdate", this.onPlayerUpdate);
|
|
66
70
|
this.on("event", this.handleEvent);
|
|
67
|
-
this.#dataStore = new Map();
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
get previous() {
|
|
@@ -308,8 +311,7 @@ class Player extends EventEmitter {
|
|
|
308
311
|
this.aqua.send({ op: 4, d: data });
|
|
309
312
|
}
|
|
310
313
|
|
|
311
|
-
|
|
312
|
-
#dataStore;
|
|
314
|
+
#dataStore = new Map();
|
|
313
315
|
|
|
314
316
|
set(key, value) {
|
|
315
317
|
this.#dataStore.set(key, value);
|
|
@@ -324,11 +326,8 @@ class Player extends EventEmitter {
|
|
|
324
326
|
return this;
|
|
325
327
|
}
|
|
326
328
|
|
|
327
|
-
|
|
328
|
-
return this.nodes.rest.updatePlayer({
|
|
329
|
-
guildId: this.guildId,
|
|
330
|
-
data,
|
|
331
|
-
});
|
|
329
|
+
updatePlayer(data) {
|
|
330
|
+
return this.nodes.rest.updatePlayer({ guildId: this.guildId, data });
|
|
332
331
|
}
|
|
333
332
|
|
|
334
333
|
handleUnknownEvent(payload) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aqualink",
|
|
3
|
-
"version": "1.8.1-
|
|
3
|
+
"version": "1.8.1-beta4",
|
|
4
4
|
"description": "An Lavalink wrapper, focused in speed, performance, and features, Based in Riffy!",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"license": "ISC",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"undici": "^7.3.0",
|
|
41
|
-
"ws": "^8.18.
|
|
41
|
+
"ws": "^8.18.1"
|
|
42
42
|
},
|
|
43
43
|
"repository": {
|
|
44
44
|
"type": "git",
|