Releases: lavalibs/lavaqueue
Releases · lavalibs/lavaqueue
v1.1.0
Additions
Queue#next
now accepts acount
parameter to advance multiple timesQueue#unshift
has been added to prepend tracks to the queueQueue#tracks
now acceptsstart
andend
parameters to easily paginate resultsQueue#trim
has been added to trim the queue to between the specifiedstart
andstop
positionsQueueStore#start
now accepts afilter
parameter of signature(guildID: string) => boolean
to control which guilds get started
Fixes
- Readme now shows correct examples
- Reference has been updated
- Return type of
Queue#add
has been properly designated asPromise<number>
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 propertiestrack
andposition
tracks(): 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;
}
}