API reference
Method GetPlayerAsync
- Namespace
- DisCatSharp.Lavalink
- Assembly
- DisCatSharp.Lavalink.dll
GetPlayerAsync(DiscordGuild, CancellationToken)
Gets the lavalink player attached to guild.
Use GetGuildPlayer(DiscordGuild) if you want to interact with the actual player.
public Task<LavalinkPlayer> GetPlayerAsync(DiscordGuild guild, CancellationToken cancellationToken = default)
Parameters
guildDiscordGuildThe guild to get the player for.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<LavalinkPlayer>
The found player or null.