aqualink 1.6.2-beta → 1.6.2-beta2
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 +2 -1
- package/build/structures/Aqua.js +7 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,9 +27,10 @@ This code is based in riffy, but its an 100% Rewrite made from scratch...
|
|
|
27
27
|
|
|
28
28
|
# Omg version 1.6.0 || 1.6.1 || 1.6.2 woah aqualink
|
|
29
29
|
|
|
30
|
-
Version 1.6.2
|
|
30
|
+
Version 1.6.2-2
|
|
31
31
|
- Fixed the rejected error (connection, for example using destroy returns an error)
|
|
32
32
|
- Added bun support (now it should work with bun too)
|
|
33
|
+
- 2: fix all connections errors (hope)
|
|
33
34
|
|
|
34
35
|
Version 1.6.1:
|
|
35
36
|
|
package/build/structures/Aqua.js
CHANGED
|
@@ -78,17 +78,13 @@ class Aqua extends EventEmitter {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
updateVoiceState(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
player.connection[updateType](packet.d);
|
|
87
|
-
if (packet.d.status === "disconnected") {
|
|
88
|
-
this.cleanupPlayer(player);
|
|
81
|
+
updateVoiceState({ d, t }) {
|
|
82
|
+
const player = this.players.get(d.guild_id);
|
|
83
|
+
if (player && (t === "VOICE_SERVER_UPDATE" || t === "VOICE_STATE_UPDATE" && d.user_id === this.clientId)) {
|
|
84
|
+
player.connection[t === "VOICE_SERVER_UPDATE" ? "setServerUpdate" : "setStateUpdate"](d);
|
|
85
|
+
if (d.status === "disconnected") this.cleanupPlayer(player);
|
|
89
86
|
}
|
|
90
87
|
}
|
|
91
|
-
|
|
92
88
|
fetchRegion(region) {
|
|
93
89
|
if (!region) return this.leastUsedNodes;
|
|
94
90
|
const lowerRegion = region.toLowerCase();
|
|
@@ -104,8 +100,8 @@ class Aqua extends EventEmitter {
|
|
|
104
100
|
|
|
105
101
|
createConnection(options) {
|
|
106
102
|
this.ensureInitialized();
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
103
|
+
const player = this.players.get(options.guildId);
|
|
104
|
+
if (player && player.voiceChannel) return player;
|
|
109
105
|
const node = options.region ? this.fetchRegion(options.region)[0] : this.leastUsedNodes[0];
|
|
110
106
|
if (!node) throw new Error("No nodes are available");
|
|
111
107
|
return this.createPlayer(node, options);
|