public async Task ModifyGuildMemberAsync(ulong guildId, ulong userId, ModifyGuildMemberArgs packet) { await RatelimitHelper.ProcessRateLimitedAsync( $"guilds:{guildId}", cache, async() => { return(await RestClient.PatchAsync($"/guilds/{guildId}/members/{userId}", JsonConvert.SerializeObject(packet, serializer) )); }); }
/// <inheritdoc/> public async Task ModifyGuildMemberAsync( ulong guildId, ulong userId, ModifyGuildMemberArgs packet) { var response = await httpClient.PatchAsync( DiscordApiRoutes.GuildMember(guildId, userId), JsonSerializer.Serialize(packet, options)) .ConfigureAwait(false); HandleErrors(response, options); }
public async ValueTask ModifyGuildMemberAsync( ulong guildId, ulong userId, ModifyGuildMemberArgs packet) { var response = await RestClient.PatchJsonAsync( DiscordApiRoutes.GuildMember(guildId, userId), packet) .ConfigureAwait(false); HandleErrors(response); }