HarmonyLink Documentation
- README
- Globals
- HarmonyLink
- Node
- Player
- Queue
- Track
- Response
- ConnectionHandler
- WebSocketClosedEvent
- TrackStuckEvent
- TrackStartEvent
- TrackExceptionEvent
- TrackEndEvent
- TrackDataInfo
- SetStateUpdate
- PlayerOptions
- PlayerEvents
- NodeStats
- NodeOption
- NodeInfo
- NodeGroup
- NodeEvents
- LavalinkNodeStatsPacket
- HarmonyLinkRequesterOptions
- HarmonyLinkEvents
- HarmonyLinkConfiguration
- FrequenCInfo
- FiltersOptions
- ErrorResponses
- FailingAddresses
- DistortionOptions
- ConnectionOptions
- Config
- ChannelMixOptions
- NodeType
- DiscordVoiceStates
- PlayerConnectionState
- PlayerLoop
- VoiceConnectionState
- AbstractPlugin
- DJSLibrary
- ErisJS
- OceanicJS
- CamelToSnake
- DefaultOptions
- GetDefaultConnectionOptions
- GetDefaultNodeStats
- LoadPlugins
- ParseHarmonyLinkConfig
- ParseOptions
- SnakeToCamel
- AnyOtherPacket
- Band
- IPBlockType
- LavalinkPlayerUpdatePacket
- LavalinkReadyPacket
- NoPlaylistInfo
- PacketVoiceServerUpdate
- PacketVoiceStateUpdate
- PlayerEvent
- PlayerObjectFromAPI
- PlayerState
- PlaylistInfoFound
- ResolveOptions
- RoutePlannerStatusBIRP
- RoutePlannerStatusBase
- RoutePlannerStatusNIRP
- RoutePlannerStatusRIRP
- RoutePlannerStatusRNIP
- TrackData
- TrackLoadResultEmpty
- TrackLoadResultPlaylist
- TrackLoadResultSearch
- TrackLoadResultTrack
- TrackLoadingResultException
- UpdatePlayerInfo
- UpdatePlayerOptions
- UpdatePlayerTrack
- VoiceServer
- KaraokeOptions
- LowPassOptions
- RotationOptions
- TimescaleOptions
- TremoloOptions
- VibratoOptions
- EventData
- LavaLinkLoadTypes
- LavalinkEventPacket
- LavalinkPackets
- LoadTrackResult
- NodeLinkV2LoadTypes
- NodeOptions
- Packet
- PartialNull
- PlayerEventType
- PlaylistInfo
- RequiredHarmonyLinkConfiguration
- RoutePlannerStatus
- RoutePlannerStatusDisabled
- Severity
- Snowflake
- TDateISO
- TDateISODate
- TDateISOTime
- TDay
- THours
- TMilliseconds
- TMinutes
- TMonth
- TSeconds
- TYear
- TrackEndReason
- Config
DJSLibrary
harmonylink • Docs
harmonylink / DJSLibrary
Class: DJSLibrary
Extends
default
Constructors
new DJSLibrary()
new DJSLibrary(
client
):DJSLibrary
Parameters
• client: any
Returns
Inherited from
AbstractLibraryClass.constructor
Defined in
src/librarys/AbstractLibraryClass.ts:17
Properties
client
protected
readonly
client:any
Inherited from
AbstractLibraryClass.client
Defined in
src/librarys/AbstractLibraryClass.ts:14
manager
protected
manager:null
|HarmonyLink
=null
Inherited from
AbstractLibraryClass.manager
Defined in
src/librarys/AbstractLibraryClass.ts:15
Accessors
userID
get
userID():string
Get the user ID of the bot
Abstract
getter method for the user ID of the bot
Returns
string
Overrides
AbstractLibraryClass.userID
Defined in
src/librarys/DJS.ts:7
Methods
initialize()
initialize(
manager
):this
Initialize the library class
Parameters
• manager: HarmonyLink
The HarmonyLink instance
Returns
this
the instance of the class
Inherited from
AbstractLibraryClass.initialize
Defined in
src/librarys/AbstractLibraryClass.ts:27
listen()
listen(
nodes
):void
Listen for events from the discord gateway that are arriving on the library
Parameters
• nodes: NodeGroup
[]
Returns
void
Abstract
method to listen for events from the discord gateway that are arriving on the library
Overrides
AbstractLibraryClass.listen
Defined in
src/librarys/DJS.ts:19
raw()
protected
raw(incomingData
):Promise
<DJSLibrary
>
Handle raw packets from the gateway
Parameters
• incomingData: Packet
The packet to handle
Returns
Promise
<DJSLibrary
>
Inherited from
AbstractLibraryClass.raw
Defined in
src/librarys/AbstractLibraryClass.ts:36
ready()
protected
ready(nodes
):Promise
<void
>
Parameters
• nodes: NodeGroup
[]
Returns
Promise
<void
>
Inherited from
AbstractLibraryClass.ready
Defined in
src/librarys/AbstractLibraryClass.ts:72
sendPacket()
sendPacket(
shardId
,payload
,important
):void
Send raw packets to the gateway to communicate with the Discord API
Parameters
• shardId: number
The shard ID to send the packet with
• payload: AnyOtherPacket
The payload to send
• important: boolean
= false
Whether the packet is important or not (default: false)
Returns
void
Abstract
method to send packets to the gateway
Overrides
AbstractLibraryClass.sendPacket
Defined in
src/librarys/DJS.ts:15
shardID()
shardID(
guildId
):number
Parameters
• guildId: string
Returns
number
Overrides
AbstractLibraryClass.shardID
Defined in
src/librarys/DJS.ts:11