Allow clients to send 'Gateway Voice State Update' command (#1888)
* Expose SendVoiceStateUpdateAsync API to clients Fixes #1882 * Revert "Expose SendVoiceStateUpdateAsync API to clients" This reverts commit 1a11cae7 * Add IAudioChannel.ModifyAsync API * fix NRE with request options Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com> Co-authored-by: quin lynch <lynchquin@gmail.com>
This commit is contained in:
@@ -311,7 +311,6 @@ namespace Discord.API
|
||||
}
|
||||
public async Task SendVoiceStateUpdateAsync(ulong guildId, ulong? channelId, bool selfDeaf, bool selfMute, RequestOptions options = null)
|
||||
{
|
||||
options = RequestOptions.CreateOrClone(options);
|
||||
var payload = new VoiceStateUpdateParams
|
||||
{
|
||||
GuildId = guildId,
|
||||
@@ -319,6 +318,12 @@ namespace Discord.API
|
||||
SelfDeaf = selfDeaf,
|
||||
SelfMute = selfMute
|
||||
};
|
||||
options = RequestOptions.CreateOrClone(options);
|
||||
await SendGatewayAsync(GatewayOpCode.VoiceStateUpdate, payload, options: options).ConfigureAwait(false);
|
||||
}
|
||||
public async Task SendVoiceStateUpdateAsync(VoiceStateUpdateParams payload, RequestOptions options = null)
|
||||
{
|
||||
options = RequestOptions.CreateOrClone(options);
|
||||
await SendGatewayAsync(GatewayOpCode.VoiceStateUpdate, payload, options: options).ConfigureAwait(false);
|
||||
}
|
||||
public async Task SendGuildSyncAsync(IEnumerable<ulong> guildIds, RequestOptions options = null)
|
||||
|
||||
Reference in New Issue
Block a user