magmastream 2.9.0-dev.19 → 2.9.0-dev.20
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
|
@@ -540,10 +540,10 @@ class Node {
|
|
|
540
540
|
const current = await player.queue.getCurrent();
|
|
541
541
|
if (!skipFlag && (previous.length === 0 || (previous[0] && previous[0].track !== current?.track))) {
|
|
542
542
|
await player.queue.addPrevious(current);
|
|
543
|
-
|
|
544
|
-
if (
|
|
545
|
-
|
|
546
|
-
await player.queue.setPrevious(
|
|
543
|
+
const updated = await player.queue.getPrevious();
|
|
544
|
+
if (updated.length > this.manager.options.maxPreviousTracks) {
|
|
545
|
+
const trimmed = updated.slice(0, this.manager.options.maxPreviousTracks);
|
|
546
|
+
await player.queue.setPrevious(trimmed);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
const oldPlayer = player;
|
package/dist/structures/Queue.js
CHANGED