GuildQueue
No description provided
GuildQueue
| Parameter | Type | Optional |
|---|---|---|
| player | Player | ❌ |
| options | GuildNodeInit<Meta> | ❌ |
Properties
public dispatcher: any
public filters: any
public history: any
public node: any
public onAfterCreateStream: any
public onBeforeCreateStream: any
public options: any
public player: any
public repeatMode: any
public stats: any
public syncedLyricsProvider: any
public tasksQueue: any
public timeouts: any
public tracks: any
public channel: any
The voice channel of this queue
public connection: any
The voice connection of this queue
public currentTrack: any
Indicates current track of this queue
public deleted: any
Indicates if this queue was deleted previously
public durationFormatted: any
Formatted duration of this queue
public estimatedDuration: any
Estimated duration of this queue in ms
public guild: any
The guild this queue belongs to
public hasDebugger: any
public id: any
The id of this queue
public isShuffling: any
Whether shuffle mode is enabled for this queue.
public maxHistorySize: any
Max history size of this queue
public maxSize: any
Max size of this queue
public metadata: any
The metadata of this queue
public ping: any
The voice connection latency of this queue
public size: any
Gets the size of the queue
Methods
public addTrack(track): void
Add track to the queue. This will emit audioTracksAdd when multiple tracks are added, otherwise audioTrackAdd.
| Parameter | Type | Optional | Description |
|---|---|---|---|
| track | Playlist | Track<unknown>Array<Track<unknown>> | ❌ | Track or playlist or array of tracks to add |
public clear(): void
Clear this queue
public connect(channelResolvable, options): Promise<GuildQueue<Meta>>
Connect to a voice channel
| Parameter | Type | Optional | Description |
|---|---|---|---|
| channelResolvable | GuildVoiceChannelResolvable | ❌ | The voice channel to connect to |
| options | VoiceConnectConfig | ❌ | Join config |
public copyTrack(track, index): void
Copy a track in the queue
| Parameter | Type | Optional |
|---|---|---|
| track | TrackResolvable | ❌ |
| index | number | ❌ |
public createDispatcher(connection, options): void
Create stream dispatcher from the given connection
| Parameter | Type | Optional | Description |
|---|---|---|---|
| connection | VoiceConnection | ❌ | The connection to use |
| options | Pick<VoiceConnectConfig['audioPlayer'],'timeout'> | ❌ | N/A |
public debug(m): void
Write a debug message to this queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| m | string | ❌ | The message to write |
public delete(): void
Delete this queue
public disableShuffle(): boolean
Disable shuffle mode for this queue.
public emit(event, args): boolean
Emit an event on this queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| event | K | ❌ | The event to emit |
| args | Parameters<GuildQueueEvents<Meta>[K]> | ❌ | The args for the event |
public enableShuffle(dynamic): boolean
Enable shuffle mode for this queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| dynamic | boolean | ❌ | Whether to shuffle the queue dynamically. Defaults to true. Dynamic shuffling will shuffle the queue when the current track ends, without mutating the queue. If set to false, the queue will be shuffled immediately in-place, which cannot be undone. |
public getCapacity(): number
Get queue capacity
public getMaxHistorySize(): number
Max history size of this queue
public getMaxSize(): number
Max size of this queue
public getSize(): number
The size of this queue
public insertTrack(track, index): void
Inserts the track to the given index
| Parameter | Type | Optional | Description |
|---|---|---|---|
| track | Track<unknown> | ❌ | The track to insert |
| index | number | ❌ | The index to insert the track at (defaults to 0) |
public isEmpty(): boolean
Check if this queue has no tracks left in it
public isFull(): boolean
Check if this queue is full
public isPlaying(): boolean
Check if this queue currently holds active audio resource
public isTransitioning(): boolean
if this queue is currently under transition mode
public moveTrack(track, index): void
Moves a track in the queue
| Parameter | Type | Optional |
|---|---|---|
| track | TrackResolvable | ❌ |
| index | number | ❌ |
public play(track, options?): Promise<PlayerNodeInitializationResult<Meta>>
Play a track in this queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| track | TrackLike | ❌ | The track to be played |
| options | PlayerNodeInitializerOptions<Meta> | ✅ | Player node initialization options |
public removeTrack(track): null | Track<unknown>
Remove a track from queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| track | TrackResolvable | ❌ | The track to remove |
public revive(): void
Revives this queue
public setMaxHistorySize(size): void
Set max history size for this queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| size | number | ❌ | The size to set |
public setMaxSize(size): void
Set max size for this queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| size | number | ❌ | The size to set |
public setMetadata(m): void
Set metadata for this queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| m | Meta | ❌ | Metadata to set |
public setRepeatMode(mode): void
Set repeat mode for this queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| mode | QueueRepeatMode | ❌ | The repeat mode to apply |
public setSelfDeaf(mode?, reason?): Promise<GuildMember>
Set self deaf
public setSelfMute(mode?, reason?): Promise<GuildMember>
Set self mute
public setTransitioning(state): void
Set transition mode for this queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| state | boolean | ❌ | The state to set |
public swapTracks(src, dest): void
Swap two tracks in the queue
| Parameter | Type | Optional | Description |
|---|---|---|---|
| src | TrackResolvable | ❌ | The first track to swap |
| dest | TrackResolvable | ❌ | The second track to swap |
public syncedLyrics(lyrics): SyncedLyricsProvider
The sync lyrics provider for this queue.
| Parameter | Type | Optional |
|---|---|---|
| lyrics | LrcSearchResult | LrcGetResult | ❌ |
public toggleShuffle(dynamic): boolean
Toggle shuffle mode for this queue.
| Parameter | Type | Optional | Description |
|---|---|---|---|
| dynamic | boolean | ❌ | Whether to shuffle the queue dynamically. Defaults to true. |