🆕 add createPlaylist method
This commit is contained in:
parent
211d62d24a
commit
b643367862
1 changed files with 9 additions and 1 deletions
|
@ -2,7 +2,7 @@ import { Client, Collection, GuildResolvable, Snowflake, User, VoiceState, Inten
|
|||
import { TypedEmitter as EventEmitter } from "tiny-typed-emitter";
|
||||
import { Queue } from "./Structures/Queue";
|
||||
import { VoiceUtils } from "./VoiceInterface/VoiceUtils";
|
||||
import { PlayerEvents, PlayerOptions, QueryType, SearchOptions, PlayerInitOptions, PlayerSearchResult } from "./types/types";
|
||||
import { PlayerEvents, PlayerOptions, QueryType, SearchOptions, PlayerInitOptions, PlayerSearchResult, PlaylistInitData } from "./types/types";
|
||||
import Track from "./Structures/Track";
|
||||
import { QueryResolver } from "./utils/QueryResolver";
|
||||
import YouTube from "youtube-sr";
|
||||
|
@ -596,6 +596,14 @@ class Player extends EventEmitter<PlayerEvents> {
|
|||
*[Symbol.iterator]() {
|
||||
yield* Array.from(this.queues.values());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates `Playlist` instance
|
||||
* @param data The data to initialize a playlist
|
||||
*/
|
||||
createPlaylist(data: PlaylistInitData) {
|
||||
return new Playlist(this, data);
|
||||
}
|
||||
}
|
||||
|
||||
export { Player };
|
||||
|
|
Loading…
Reference in a new issue