Discolink
GitHub
Preparing search index...
Queue
Queue
Class Queue<Context>
Type Parameters
Context
extends
Record
<
string
,
unknown
>
=
QueueContext
Index
Constructors
constructor
Properties
context
voice
filters
player
Accessors
node
rest
guild
Id
volume
paused
stopped
empty
playing
autoplay
finished
destroyed
repeat
Mode
has
Next
has
Previous
track
previous
Track
tracks
previous
Tracks
length
total
Length
duration
formatted
Duration
current
Time
formatted
Current
Time
Methods
sync
search
add
add
Related
remove
clear
jump
pause
resume
seek
next
previous
shuffle
set
Volume
set
Autoplay
set
Repeat
Mode
stop
destroy
Constructors
constructor
new
Queue
<
Context
extends
Record
<
string
,
unknown
>
=
QueueContext
>
(
player
:
Player
,
guildId
:
string
,
context
?:
Context
,
)
:
Queue
<
Context
>
Type Parameters
Context
extends
Record
<
string
,
unknown
>
=
QueueContext
Parameters
player
:
Player
guildId
:
string
Optional
context
:
Context
Returns
Queue
<
Context
>
Properties
context
context
:
Context
= ...
Readonly
voice
voice
:
VoiceState
Readonly
filters
filters
:
FilterManager
Readonly
player
player
:
Player
Accessors
node
get
node
()
:
Node
Returns
Node
rest
get
rest
()
:
REST
Returns
REST
guild
Id
get
guildId
()
:
string
Returns
string
volume
get
volume
()
:
number
Returns
number
paused
get
paused
()
:
boolean
Returns
boolean
stopped
get
stopped
()
:
boolean
Returns
boolean
empty
get
empty
()
:
boolean
Returns
boolean
playing
get
playing
()
:
boolean
Returns
boolean
autoplay
get
autoplay
()
:
boolean
Returns
boolean
finished
get
finished
()
:
boolean
Returns
boolean
destroyed
get
destroyed
()
:
boolean
Returns
boolean
repeat
Mode
get
repeatMode
()
:
RepeatMode
Returns
RepeatMode
has
Next
get
hasNext
()
:
boolean
Returns
boolean
has
Previous
get
hasPrevious
()
:
boolean
Returns
boolean
track
get
track
()
:
Track
<
CommonUserData
,
CommonPluginInfo
>
|
null
Returns
Track
<
CommonUserData
,
CommonPluginInfo
>
|
null
previous
Track
get
previousTrack
()
:
Track
<
CommonUserData
,
CommonPluginInfo
>
|
null
Returns
Track
<
CommonUserData
,
CommonPluginInfo
>
|
null
tracks
get
tracks
()
:
Track
<
CommonUserData
,
CommonPluginInfo
>
[]
Returns
Track
<
CommonUserData
,
CommonPluginInfo
>
[]
previous
Tracks
get
previousTracks
()
:
Track
<
CommonUserData
,
CommonPluginInfo
>
[]
Returns
Track
<
CommonUserData
,
CommonPluginInfo
>
[]
length
get
length
()
:
number
Returns
number
total
Length
get
totalLength
()
:
number
Returns
number
duration
get
duration
()
:
number
Returns
number
formatted
Duration
get
formattedDuration
()
:
string
Returns
string
current
Time
get
currentTime
()
:
number
Returns
number
formatted
Current
Time
get
formattedCurrentTime
()
:
string
Returns
string
Methods
sync
sync
(
target
?:
"local"
|
"remote"
)
:
Promise
<
void
>
Parameters
target
:
"local"
|
"remote"
= "local"
Returns
Promise
<
void
>
search
search
(
query
:
string
,
prefix
?:
string
)
:
Promise
<
SearchResult
>
Parameters
query
:
string
prefix
:
string
= ...
Returns
Promise
<
SearchResult
>
add
add
(
source
:
|
Track
<
CommonUserData
,
CommonPluginInfo
>
|
Track
<
CommonUserData
,
CommonPluginInfo
>
[]
|
Playlist
<
CommonPluginInfo
>
,
userData
?:
JsonObject
,
)
:
Queue
<
Context
>
Parameters
source
:
|
Track
<
CommonUserData
,
CommonPluginInfo
>
|
Track
<
CommonUserData
,
CommonPluginInfo
>
[]
|
Playlist
<
CommonPluginInfo
>
Optional
userData
:
JsonObject
Returns
Queue
<
Context
>
add
Related
addRelated
(
refTrack
?:
Track
<
CommonUserData
,
CommonPluginInfo
>
,
)
:
Promise
<
Track
<
CommonUserData
,
CommonPluginInfo
>
[]
>
Parameters
Optional
refTrack
:
Track
<
CommonUserData
,
CommonPluginInfo
>
Returns
Promise
<
Track
<
CommonUserData
,
CommonPluginInfo
>
[]
>
remove
remove
(
index
:
number
)
:
Track
<
CommonUserData
,
CommonPluginInfo
>
|
undefined
Parameters
index
:
number
Returns
Track
<
CommonUserData
,
CommonPluginInfo
>
|
undefined
remove
(
indices
:
number
[]
)
:
Track
<
CommonUserData
,
CommonPluginInfo
>
[]
Parameters
indices
:
number
[]
Returns
Track
<
CommonUserData
,
CommonPluginInfo
>
[]
clear
clear
(
type
?:
"current"
|
"previous"
)
:
void
Parameters
Optional
type
:
"current"
|
"previous"
Returns
void
jump
jump
(
index
:
number
)
:
Promise
<
Track
<
CommonUserData
,
CommonPluginInfo
>
>
Parameters
index
:
number
Returns
Promise
<
Track
<
CommonUserData
,
CommonPluginInfo
>
>
pause
pause
()
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
resume
resume
()
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
seek
seek
(
ms
:
number
)
:
Promise
<
number
>
Parameters
ms
:
number
Returns
Promise
<
number
>
next
next
()
:
Promise
<
Track
<
CommonUserData
,
CommonPluginInfo
>
|
null
>
Returns
Promise
<
Track
<
CommonUserData
,
CommonPluginInfo
>
|
null
>
previous
previous
()
:
Promise
<
Track
<
CommonUserData
,
CommonPluginInfo
>
|
null
>
Returns
Promise
<
Track
<
CommonUserData
,
CommonPluginInfo
>
|
null
>
shuffle
shuffle
(
includePrevious
?:
boolean
)
:
Queue
<
Context
>
Parameters
includePrevious
:
boolean
= false
Returns
Queue
<
Context
>
set
Volume
setVolume
(
volume
:
number
)
:
Promise
<
number
>
Parameters
volume
:
number
Returns
Promise
<
number
>
set
Autoplay
setAutoplay
(
autoplay
?:
boolean
)
:
boolean
Parameters
autoplay
:
boolean
= false
Returns
boolean
set
Repeat
Mode
setRepeatMode
(
repeatMode
?:
RepeatMode
)
:
RepeatMode
Parameters
repeatMode
:
RepeatMode
= "none"
Returns
RepeatMode
stop
stop
()
:
Promise
<
void
>
Returns
Promise
<
void
>
destroy
destroy
(
reason
?:
string
)
:
Promise
<
void
>
Parameters
Optional
reason
:
string
Returns
Promise
<
void
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
context
voice
filters
player
Accessors
node
rest
guild
Id
volume
paused
stopped
empty
playing
autoplay
finished
destroyed
repeat
Mode
has
Next
has
Previous
track
previous
Track
tracks
previous
Tracks
length
total
Length
duration
formatted
Duration
current
Time
formatted
Current
Time
Methods
sync
search
add
add
Related
remove
clear
jump
pause
resume
seek
next
previous
shuffle
set
Volume
set
Autoplay
set
Repeat
Mode
stop
destroy
GitHub
Discolink
Loading...