From 893767a2118772882afd4c2acda3c93efa4c86ea Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Mon, 19 Apr 2021 20:39:47 +0545 Subject: [PATCH] setAutoPlay should return boolean --- src/Player.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Player.ts b/src/Player.ts index e8d8493..f978c61 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -891,11 +891,13 @@ export class Player extends EventEmitter { * @param message The message object * @param enable Enable/Disable autoplay */ - setAutoPlay(message: Message, enable: boolean): void { + setAutoPlay(message: Message, enable: boolean): boolean { const queue = this.getQueue(message); if (!queue) return void this.emit(PlayerEvents.ERROR, PlayerErrorEventCodes.NOT_PLAYING, message); queue.autoPlay = Boolean(enable); + + return queue.autoPlay; } /**