Table of Contents
API reference

Method RebindBridgeOpusSource

Namespace
DisCatSharp.Lavalink
Assembly
DisCatSharp.Lavalink.dll

Rebinds the voice connection for the specified guild to a new Opus source. Typically used to insert a VoiceOutputController between the bridge source and the voice connection. The previous binding is cancelled before the new one starts.

public bool RebindBridgeOpusSource(ulong guildId, IExternalOpusSource newSource, CancellationToken cancellationToken = default)

Parameters

guildId ulong

The guild snowflake.

newSource IExternalOpusSource

The new Opus source to bind (e.g. a VoiceOutputController).

cancellationToken CancellationToken

Cancellation token.

Returns

bool

true if the rebind succeeded; false if no voice connection exists for this guild.