API reference
Method SwitchChannelAsync
- Namespace
- DisCatSharp.Lavalink
- Assembly
- DisCatSharp.Lavalink.dll
SwitchChannelAsync(DiscordChannel, bool, CancellationToken)
Switches the player to a new channel.
public Task SwitchChannelAsync(DiscordChannel channel, bool deafened = true, CancellationToken cancellationToken = default)
Parameters
channelDiscordChannelThe new channel to switch to.
deafenedboolWhether to join deafened.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Exceptions
- ArgumentException
Thrown when the target channel is not of the base type voice.