magmastream 2.8.6-dev.4 → 2.8.6-dev.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/structures/Node.js
CHANGED
|
@@ -537,7 +537,9 @@ class Node {
|
|
|
537
537
|
async trackEnd(player, track, payload) {
|
|
538
538
|
const { reason } = payload;
|
|
539
539
|
const skipFlag = player.get("skipFlag");
|
|
540
|
-
if (!skipFlag &&
|
|
540
|
+
if (!skipFlag &&
|
|
541
|
+
(player.queue.previous.length === 0 ||
|
|
542
|
+
(player.queue.previous[0] && player.queue.previous[0].track !== player.queue.current?.track))) {
|
|
541
543
|
// Store the current track in the previous tracks queue
|
|
542
544
|
player.queue.previous.push(player.queue.current);
|
|
543
545
|
// Limit the previous tracks queue to maxPreviousTracks
|
package/dist/structures/Rest.js
CHANGED
|
@@ -104,10 +104,14 @@ class Rest {
|
|
|
104
104
|
return response.data;
|
|
105
105
|
}
|
|
106
106
|
catch (error) {
|
|
107
|
-
if (error
|
|
107
|
+
if (!error.response) {
|
|
108
|
+
console.error("No response from node:", error.message);
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
if (error.response.data?.message === "Guild not found") {
|
|
108
112
|
return [];
|
|
109
113
|
}
|
|
110
|
-
else if (error
|
|
114
|
+
else if (error.response.status === 404) {
|
|
111
115
|
await this.node.destroy();
|
|
112
116
|
this.node.manager.createNode(this.node.options).connect();
|
|
113
117
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magmastream",
|
|
3
|
-
"version": "2.8.6-dev.
|
|
3
|
+
"version": "2.8.6-dev.6",
|
|
4
4
|
"description": "A user-friendly Lavalink client designed for NodeJS.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -88,4 +88,4 @@
|
|
|
88
88
|
"homepage": "https://docs.magmastream.com",
|
|
89
89
|
"author": "Abel Purnwasy",
|
|
90
90
|
"license": "Apache-2.0"
|
|
91
|
-
}
|
|
91
|
+
}
|