connect static method
Create a new client connected to a Lavalink server.
Implementation
static Future<LavalinkClient> connect(
Uri base, {
required String password,
required String userId,
String clientName = defaultClientName,
}) async {
// Ensure the path will be used as a directory in resolve()
if (!base.path.endsWith('/')) base = base.replace(path: '${base.path}/');
final client = LavalinkClient._(
base: base,
password: password,
userId: userId,
clientName: clientName,
);
client._connection = await LavalinkConnection.connect(client);
return client;
}