v1.0.0
Initial stable release. Supports Lavalink v3. Any undocumented types can be found in the reference for the main Lavalink wrapper.
API description
Queue
- readonly
store: QueueStore - readonly
guildID: string - readonly
keys: { list: string, np: string }- the Redis keys to use for the playlist and now playing info - readonly
player: Player start(): Promise<boolean>- start the queueadd(...tracks: string[]): Promise<any>- add tracks to the queueremove(track: string): PromiseLike<number>- remove a track from the queuenext(): Promise<boolean>- skip to the next songstop(): Promise<void>- stop playback and clear the queueclear(): Promise<any>- clear the queued songscurrent(): Promise<NP | null>- retrieve the current song: returns an object with propertiestrackandpositiontracks(): Promise<string[]>- retrieves queued tracks
interface NP {
position?: number;
track: string;
}QueueStore extends Map<string, Queue>
- readonly
client: Client redis: Redis- the ioredis instance this queue store is usingstart(): Promise<void>- start all currently playing queuesget(key: string): Queue- gets the specified queue, or creates one if none is found
QueueClient extends Client
constructor(opts: Options)- readonly
queues: QueueStore
interface Options extends ClientOptions {
hosts?: {
ws?: ws?: string | { url: string, options: WebSocket.ClientOptions };
rest?: string;
redis?: Redis.Redis | Redis.RedisOptions;
}
}