Skip to content

Use `type_map_insert` for LavalinkClient setup.

Zacchary Dempsey-Plante requested to merge (removed):master into master

Serenity's ClientBuilder has a type_map_insert function, which does what the

{
	let mut data = client.data.write().await;
	data.insert::<Lavalink>(lava_client);
}

block does.

Using type_map_insert is more clear, and allows the setup of the LavalinkClient in environments like Poise where you don't have access to the built Client object.

Merge request reports