📄️ Introduction
Some bots may want to use a custom player implementation. Custom players can be used to handle specific needs of your bot.
📄️ Lifetime
The lifetime of a player is the time between the creation of the player and the disposal of the player.
📄️ Creating custom players
Lavalink4NET provides a way to create custom players using player factories. Similar to integrated players, we will create and use a player factory used to create your player.
📄️ Passing data
Lavalink4NET provides a way to pass data to the player. This can be useful if you want to store information about the player.
📄️ Service resolution
Lavalink4NET is tightly integrated with the provided dependency injection system. This means that you can use dependency injection to resolve services in your custom player implementation.
📄️ Handling events
Most players allow you to override methods to handle events inside of the player. For example, the QueuedLavalinkPlayer class allows you to override the OnTrackStartedAsync method to handle the TrackStarted event.