Skip to content

feat: Add ConnectionReady event for connection state monitoring #236

Description

@connorjamessmith

Is your feature request related to a problem? Please describe.
I need to track when Lavalink nodes connect/reconnect for health monitoring in my Discord bot. Currently, there's a ConnectionClosed event but no corresponding ConnectionReady event for when connections are established.

Describe the solution you'd like
Add a ConnectionReady event to IAudioService that fires when a Lavalink node connection is established (both initial connection and reconnection).

_lavalinkClient.ConnectionReady += (sender, args) => {
    Status = HealthStatus.Healthy;
};

Describe alternatives you've considered

  • Log parsing - Current workaround.
  • Periodic connection checks - No suitable property exposed, less efficient than events

Additional context
I have a working implementation with tests ready to submit as a PR if this aligns with the library's direction.
Implementation: https://github.com/connorjamessmith/Lavalink4NET/tree/feature/connorjamessmith/connection-ready-event

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions