Skip to content

NodeManagerEvents

Events

EventTypeDescriptionDefined in
connect(node: LavalinkNode) => voidEmitted when a Node is connected. Manager.nodeManager#connectsrc/structures/Types/Node.ts:212
create(node: LavalinkNode) => voidEmitted when a Node is created. Manager.nodeManager#createsrc/structures/Types/Node.ts:200
destroy(node: LavalinkNode, destroyReason?: string) => voidEmitted when a Node is destroyed. Manager.nodeManager#destroysrc/structures/Types/Node.ts:206
disconnect(node: LavalinkNode, reason: object) => voidEmitted when a Node is disconnects. Manager.nodeManager#disconnectsrc/structures/Types/Node.ts:231
error(node: LavalinkNode, error: Error, payload?: unknown) => voidEmitted when a Node is error. Manager.nodeManager#errorsrc/structures/Types/Node.ts:237
raw(node: LavalinkNode, payload: unknown) => voidEmits every single Node event. Manager.nodeManager#rawsrc/structures/Types/Node.ts:243
reconnecting(node: LavalinkNode) => voidEmitted when a Node is reconnecting. Manager.nodeManager#reconnectingsrc/structures/Types/Node.ts:218
reconnectinprogress(node: LavalinkNode) => voidEmitted When a node starts to reconnect (if you have a reconnection delay, the reconnecting event will be emitted after the retryDelay.) Useful to check wether the internal node reconnect system works or not Manager.nodeManager#reconnectinprogresssrc/structures/Types/Node.ts:225
resumed(node: LavalinkNode, paylaod: object, players: LavalinkPlayer[] | InvalidLavalinkRestRequest) => voidEmits when the node connects resumed. You then need to create all players within this event for your usecase. Aka for that you need to be able to save player data like vc channel + text channel in a db and then sync it again Manager.nodeManager#nodeResumedsrc/structures/Types/Node.ts:250