setAutoPlay should return boolean
This commit is contained in:
parent
c2f3190f59
commit
893767a211
1 changed files with 3 additions and 1 deletions
|
@ -891,11 +891,13 @@ export class Player extends EventEmitter {
|
||||||
* @param message The message object
|
* @param message The message object
|
||||||
* @param enable Enable/Disable autoplay
|
* @param enable Enable/Disable autoplay
|
||||||
*/
|
*/
|
||||||
setAutoPlay(message: Message, enable: boolean): void {
|
setAutoPlay(message: Message, enable: boolean): boolean {
|
||||||
const queue = this.getQueue(message);
|
const queue = this.getQueue(message);
|
||||||
if (!queue) return void this.emit(PlayerEvents.ERROR, PlayerErrorEventCodes.NOT_PLAYING, message);
|
if (!queue) return void this.emit(PlayerEvents.ERROR, PlayerErrorEventCodes.NOT_PLAYING, message);
|
||||||
|
|
||||||
queue.autoPlay = Boolean(enable);
|
queue.autoPlay = Boolean(enable);
|
||||||
|
|
||||||
|
return queue.autoPlay;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue