Add method to disconnect users from a voice channel
* Update a guild member.
*
* @param userId The user to update.
* @param guildMember The updates to the user.
*
* @throws com.jessecorbett.diskord.api.exception.DiscordException
*/
suspend fun updateMember(userId: String, guildMember: PatchGuildMember) =
patchRequest("/guilds/$guildId/members/$userId", guildMember, PatchGuildMember.serializer(), omitNullProperties = true)
This function, due to the omitNullProperties = true
, can't allow the channelId
to be set to null, therefore it is impossible to disconnect a user from VC with this.