API reference
Method PlayAsync
- Namespace
- DisCatSharp.Lavalink
- Assembly
- DisCatSharp.Lavalink.dll
PlayAsync(string, CancellationToken)
Plays a song by its identifier.
public Task<LavalinkGuildPlayer> PlayAsync(string identifier, CancellationToken cancellationToken = default)
Parameters
identifierstringThe identifier to play.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<LavalinkGuildPlayer>
The updated guild player.
PlayAsync(LavalinkTrack, CancellationToken)
Plays a track.
public Task<LavalinkGuildPlayer> PlayAsync(LavalinkTrack track, CancellationToken cancellationToken = default)
Parameters
trackLavalinkTrackThe track to play.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<LavalinkGuildPlayer>
The updated guild player.