From 5ae56c7029cffef413dac1aa9374a437ab056e2e Mon Sep 17 00:00:00 2001 From: Vexify4103 Date: Wed, 26 Feb 2025 18:36:35 +0100 Subject: [PATCH 1/3] fix: player.setAutoplay() - fixed an issue which caused only client.user to work with autoplay and not a normal user object --- src/structures/Player.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Player.ts b/src/structures/Player.ts index ec281798..d9aaecec 100644 --- a/src/structures/Player.ts +++ b/src/structures/Player.ts @@ -403,7 +403,7 @@ export class Player { throw new TypeError("botUser must be provided when enabling autoplay."); } - if (!(botUser instanceof ClientUser) || !(botUser instanceof User)) { + if (!(botUser instanceof ClientUser) && !(botUser instanceof User)) { throw new TypeError("botUser must be a user-object."); } From 2214512920f6359e815d8069772fdc6b96ff6e7b Mon Sep 17 00:00:00 2001 From: Vexify4103 Date: Wed, 26 Feb 2025 19:07:29 +0100 Subject: [PATCH 2/3] 2.8.5 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d3bc96d0..0ae8343e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "magmastream", - "version": "2.8.4", + "version": "2.8.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "magmastream", - "version": "2.8.4", + "version": "2.8.5", "license": "Apache-2.0", "dependencies": { "@discordjs/collection": "^2.1.1", diff --git a/package.json b/package.json index 7c5582b1..bdd95af4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "magmastream", - "version": "2.8.4", + "version": "2.8.5", "description": "A user-friendly Lavalink client designed for NodeJS.", "main": "dist/index.js", "types": "dist/index.d.ts", From f56b019e327010ecb9154e9c0063797efbd972df Mon Sep 17 00:00:00 2001 From: Vexify4103 Date: Wed, 26 Feb 2025 19:15:56 +0100 Subject: [PATCH 3/3] fix: potential null of .previous array - fixed one rare case where .previous may be "null" instead of an empty array --- src/structures/Queue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Queue.ts b/src/structures/Queue.ts index 9e7d1a5f..fbafe5f1 100644 --- a/src/structures/Queue.ts +++ b/src/structures/Queue.ts @@ -39,7 +39,7 @@ export class Queue extends Array { public current: Track | null = null; /** The previous tracks */ - public previous: Track[] | null = null; + public previous: Track[] = []; /** The Manager instance. */ public manager: Manager;