From c02818dfa3faef66bf20417b6ea7149cd3762d31 Mon Sep 17 00:00:00 2001 From: Angelo Breuer Date: Wed, 14 Feb 2024 11:40:57 +0100 Subject: [PATCH] fix: Fix property resolution --- src/Lavalink4NET.DiscordNet/DiscordClientWrapper.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Lavalink4NET.DiscordNet/DiscordClientWrapper.cs b/src/Lavalink4NET.DiscordNet/DiscordClientWrapper.cs index de51058d..6a3cb7e1 100644 --- a/src/Lavalink4NET.DiscordNet/DiscordClientWrapper.cs +++ b/src/Lavalink4NET.DiscordNet/DiscordClientWrapper.cs @@ -33,7 +33,7 @@ static DiscordClientWrapper() .GetProperties(BindingFlags.NonPublic | BindingFlags.Instance) .First(x => x.Name.Equals("ApiClient")); - _sendVoiceStateUpdateAsyncMethod = _discordApiClientProperty.PropertyType + _sendVoiceStateUpdateAsyncMethod = typeof(DiscordSocketClient).Assembly.GetType("Discord.API.DiscordSocketApiClient")! .GetMethods(BindingFlags.Instance | BindingFlags.Public) .First(x => x.Name.Equals("SendVoiceStateUpdateAsync")); } @@ -207,9 +207,9 @@ public ValueTask SendVoiceUpdateAsync(ulong guildId, ulong? voiceChannelId, bool guildId, // Guild Id voiceChannelId, // Voice Channel Id selfMute, // Self Mute - selfDeaf, // Self Deaf - requestOptions, // Request Options - }; + selfDeaf, // Self Deaf + requestOptions, // Request Options + }; return new ValueTask((Task)_sendVoiceStateUpdateAsyncMethod.Invoke(_apiClient, arguments)!); }