Skip to content

Commit

Permalink
fix: Fix property resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
angelobreuer committed Feb 14, 2024
1 parent a428201 commit c02818d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Lavalink4NET.DiscordNet/DiscordClientWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
Expand Down Expand Up @@ -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)!);
}
Expand Down

0 comments on commit c02818d

Please sign in to comment.