@types
Table of contents
Enumerations
Interfaces
- ITrack
- PlayerEventPayload
- SpeakingEventPayload
- Timestamp
- TrackEndEvent
- TrackExceptionEvent
- TrackStartEvent
- TrackStuckEvent
- WebSocketClosedEvent
Type Aliases
- ChannelMixOptions
- DistortionOptions
- EventListeners
- FilterOptions
- IncomingDiscordPayload
- Info
- KaraokeOptions
- LavaSharkOptions
- LavalinkRESTError
- LoadTracksResult
- LowPassOptions
- Metadata
- NodeOptions
- NodeStats
- OutgoingDiscordPayload
- PlayOptions
- PlayerOptions
- PlayerState
- PlaylistInfo
- RequestOptions
- RotationOptions
- RoutePlannerStatus
- SEARCH_SOURCE
- SearchResult
- TimescaleOptions
- TrackInfo
- TremoloOptions
- UpdatePlayerOptions
- VibratoOptions
- VoiceServerUpdatePayload
- VoiceState
- VoiceStateUpdatePayload
- version
Type Aliases
ChannelMixOptions
Ƭ ChannelMixOptions: Object
Type declaration
Name | Type |
---|---|
leftToLeft? | number |
leftToRight? | number |
rightToLeft? | number |
rightToRight? | number |
Defined in
DistortionOptions
Ƭ DistortionOptions: Object
Type declaration
Name | Type |
---|---|
cosOffset? | number |
cosScale? | number |
offset? | number |
scale? | number |
sinOffset? | number |
sinScale? | number |
tanOffset? | number |
tanScale? | number |
Defined in
EventListeners
Ƭ EventListeners<T
>:
Type declaration
Event | listener |
---|---|
debug | message : string |
raw | node : Node , payload : unknown |
nodeConnect | node : Node |
nodeResume | node : Node |
nodeDisconnect | node : Node , code : number , reason : string |
warn | node : Node , warn : string |
error | node : Node , error : Error |
trackStart | player : Player , track : Track |
trackEnd | player : Player , track : Track , reason : TrackEndReason |
trackStuck | player : Player , track : Track , thresholdMs : number |
trackException | player : Player , track : default | Track , exception : LoadException & { cause : string } |
playerCreate | player : Player |
playerDestroy | player : Player |
playerDisconnect | player : Player , code : number , reason : string |
queueEnd | player : Player |
pong | node : Node , ping? : number |
Type parameters
Name |
---|
T |
Type declaration
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "debug" |
listener | (message : string ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "raw" |
listener | (node : Node , payload : unknown ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "nodeConnect" |
listener | (node : Node ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "nodeResume" |
listener | (node : Node ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "nodeDisconnect" |
listener | (node : Node , code : number , reason : string ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "warn" |
listener | (node : Node , warn : string ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "error" |
listener | (node : Node , error : Error ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "trackStart" |
listener | (player : Player , track : Track ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "trackEnd" |
listener | (player : Player , track : Track , reason : TrackEndReason ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "trackStuck" |
listener | (player : Player , track : Track , thresholdMs : number ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "trackException" |
listener | (player : Player , track : default | Track , exception : LoadException & { cause : string }) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "playerCreate" |
listener | (player : Player ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "playerDestroy" |
listener | (player : Player ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "playerDisconnect" |
listener | (player : Player , code : number , reason : string ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "queueEnd" |
listener | (player : Player ) => void |
Returns
T
▸ (event
, listener
): T
LavaShark events
Parameters
Name | Type |
---|---|
event | "pong" |
listener | (node : Node , ping? : number ) => void |
Returns
T
Defined in
FilterOptions
Ƭ FilterOptions: Object
Index signature
▪ [key: string
]: unknown
Type declaration
Name | Type | Description |
---|---|---|
channelMix? | ChannelMixOptions | - |
distortion? | DistortionOptions | - |
equalizer? | number [] | 15 bands [0-14] 25 Hz, 40 Hz, 63 Hz, 100 Hz, 160 Hz, 250 Hz, 400 Hz, 630 Hz, 1 kHz, 1.6 kHz, 2.5 kHz, 4 kHz, 6.3 kHz, 10 kHz, 16 kHz |
karaoke? | KaraokeOptions | - |
lowPass? | LowPassOptions | - |
rotation? | RotationOptions | - |
timescale? | TimescaleOptions | - |
tremolo? | TremoloOptions | - |
vibrato? | VibratoOptions | - |
volume? | number | - |
Defined in
IncomingDiscordPayload
Ƭ IncomingDiscordPayload: Object
Type declaration
Name | Type |
---|---|
d? | unknown |
op | number |
s? | number |
t? | string |
Defined in
Info
Ƭ Info: Object
Lavalink Info
Type declaration
Name | Type |
---|---|
buildTime | number |
filters | string [] |
git | { branch : string ; commit : string ; commitTime : number } |
git.branch | string |
git.commit | string |
git.commitTime | number |
jvm | string |
lavaplayer | string |
plugins | { name : string ; version : string }[] |
sourceManagers | string [] |
version | { major : number ; minor : number ; patch : number ; preRelease : string | null ; semver : string } |
version.major | number |
version.minor | number |
version.patch | number |
version.preRelease | string | null |
version.semver | string |
Defined in
KaraokeOptions
Ƭ KaraokeOptions: Object
Type declaration
Name | Type |
---|---|
filterBand? | number |
filterWidth? | number |
level? | number |
monoLevel? | number |
Defined in
LavaSharkOptions
Ƭ LavaSharkOptions: Object
Main constructor options
Type declaration
Name | Type | Description |
---|---|---|
defaultSearchSource? | SEARCH_SOURCE | The default source to search for tracks |
disabledSources? | UNRESOLVED_SOURCES [] | Disables spotify, apple music or deezer |
nodes | NodeOptions [] | The array of lavalink nodes |
sendWS | (guildId : string , payload : OutgoingDiscordPayload ) => void | Function to send voice channel connect payloads to discord |
spotify? | SpotifyConfig | The spotify credentials |
unresolvedSearchSource? | SEARCH_SOURCE | The default source to search for unresolved tracks |
useISRC? | boolean | Whether to search for ISRC to resolve tracks or not |
Defined in
LavalinkRESTError
Ƭ LavalinkRESTError: Object
Type declaration
Name | Type |
---|---|
error | string |
message | string |
path | string |
status | number |
timestamp | number |
trace? | string |
Defined in
LoadTracksResult
Ƭ LoadTracksResult: LoadResultBase
& { tracks
: ITrack
[] }
Defined in
LowPassOptions
Ƭ LowPassOptions: Object
Type declaration
Name | Type |
---|---|
smoothing? | number |
Defined in
Metadata
Ƭ Metadata: Pick
<TrackInfo
, "title"
| "author"
| "uri"
> & { duration
: Timestamp
; isrc?
: string
; source
: string
}
Defined in
NodeOptions
Ƭ NodeOptions: Object
Lavalink node options
Type declaration
Name | Type | Description |
---|---|---|
followRedirects? | boolean | Whether to follow redirects or not (default is false) |
hostname | string | The node hostname |
id? | string | The node identifier |
maxRetryAttempts? | number | The max number of retry attempts |
password? | string | The node password |
port | number | The node port |
resumeKey? | string | The resume key |
resumeTimeout? | number | The resume timeout, in seconds |
retryAttemptsInterval? | number | The interval between retry attempts |
secure? | boolean | Whether to use SSL/TLS or not |
Defined in
NodeStats
Ƭ NodeStats: Object
Lavalink node stats
Type declaration
Name | Type | Description |
---|---|---|
cpu | { cores : number ; lavalinkLoad : number ; systemLoad : number } | CPU stats, [0, 1] |
cpu.cores | number | - |
cpu.lavalinkLoad | number | - |
cpu.systemLoad | number | - |
frameStats? | { deficit : number ; nulled : number ; sent : number } | Audio frame stats |
frameStats.deficit | number | - |
frameStats.nulled | number | - |
frameStats.sent | number | - |
memory | { allocated : number ; free : number ; reservable : number ; used : number } | RAM stats, in bytes |
memory.allocated | number | - |
memory.free | number | - |
memory.reservable | number | - |
memory.used | number | - |
players | number | The total player amount |
playingPlayers | number | The amount of playing players |
uptime | number | The lavalink node uptime, in seconds |
Defined in
OutgoingDiscordPayload
Ƭ OutgoingDiscordPayload: Object
Type declaration
Name | Type |
---|---|
d | Record <string , unknown > |
op | number |
Defined in
PlayOptions
Ƭ PlayOptions: Object
Type declaration
Name | Type |
---|---|
endTime? | number |
noReplace? | boolean |
pause? | boolean |
startTime? | number |
Defined in
PlayerOptions
Ƭ PlayerOptions: Object
Main constructor options
Type declaration
Name | Type | Description |
---|---|---|
guildId | string | The guild id that player belongs to |
queue? | Queue | The queue object that player will use |
selfDeaf? | boolean | Whether the bot joins the voice channel deafened or not |
selfMute? | boolean | Whether the bot joins the voice channel muted or not |
textChannelId? | string | The text channel id |
voiceChannelId | string | The voice channel id |
Defined in
PlayerState
Ƭ PlayerState: Object
Type declaration
Name | Type | Description |
---|---|---|
connected | boolean | Whether the player is connected to discord voice gateway |
position? | number | Track position in ms |
time | number | Unix timestamp when the position was picked |
Defined in
PlaylistInfo
Ƭ PlaylistInfo: Object
Type declaration
Name | Type |
---|---|
duration | number |
name | string |
selectedTrack | number |
Defined in
RequestOptions
Ƭ RequestOptions: Object
Type declaration
Name | Type |
---|---|
headers? | Record <string , string > |
json? | unknown |
method | Dispatcher.HttpMethod |
path | string |
Defined in
RotationOptions
Ƭ RotationOptions: Object
Type declaration
Name | Type |
---|---|
rotationHz? | number |
Defined in
RoutePlannerStatus
Ƭ RoutePlannerStatus: Object
Route planner API
Type declaration
Name | Type |
---|---|
class | string | null |
details | RoutePlannerDetails | null |
Defined in
SEARCH_SOURCE
Ƭ SEARCH_SOURCE: "youtube"
| "youtubemusic"
| "soundcloud"
Defined in
SearchResult
Ƭ SearchResult: LoadResultBase
& { tracks
: (Track
| UnresolvedTrack
)[] }
Defined in
TimescaleOptions
Ƭ TimescaleOptions: Object
Type declaration
Name | Type |
---|---|
pitch? | number |
rate? | number |
speed? | number |
Defined in
TrackInfo
Ƭ TrackInfo: Object
Type declaration
Name | Type |
---|---|
author | string |
identifier | string |
isSeekable | boolean |
isStream | boolean |
length | number |
position | number |
sourceName | string | null |
thumbnail? | string |
title | string |
uri | string |
Defined in
TremoloOptions
Ƭ TremoloOptions: Object
Type declaration
Name | Type |
---|---|
depth? | number |
frequency? | number |
Defined in
UpdatePlayerOptions
Ƭ UpdatePlayerOptions: Object
----- REST API -----
Type declaration
Name | Type | Description |
---|---|---|
encodedTrack? | string | null | - |
endTime? | number | - |
filters? | FilterOptions | - |
noReplace? | boolean | - |
paused? | boolean | - |
position? | number | identifier?: string; |
voice? | { endpoint : string ; sessionId : string ; token : string } | - |
voice.endpoint | string | - |
voice.sessionId | string | - |
voice.token | string | - |
volume? | number | - |
Defined in
VibratoOptions
Ƭ VibratoOptions: Object
Type declaration
Name | Type |
---|---|
depth? | number |
frequency? | number |
Defined in
VoiceServerUpdatePayload
Ƭ VoiceServerUpdatePayload: IncomingDiscordPayload
& { d
: VoiceServerUpdateData
; t
: "VOICE_SERVER_UPDATE"
}
Defined in
VoiceState
Ƭ VoiceState: Object
Type declaration
Name | Type |
---|---|
event? | VoiceServerUpdateData |
sessionId? | string |
Defined in
VoiceStateUpdatePayload
Ƭ VoiceStateUpdatePayload: IncomingDiscordPayload
& { d
: { channel_id
: string
| null
; guild_id
: string
; session_id
: string
; user_id
: string
} ; t
: "VOICE_STATE_UPDATE"
}
Defined in
version
Ƭ version: string
Lavalink version