Browse Source

Add GuildMember.disconnect to disconnect a member from voice

pull/137/head
Andrei 6 years ago
parent
commit
06a5e4921a
No known key found for this signature in database GPG Key ID: 4D2A02C7D500E9D9
  1. 6
      disco/types/guild.py

6
disco/types/guild.py

@ -222,6 +222,12 @@ class GuildMember(SlottedModel):
else:
self.client.api.guilds_members_modify(self.guild.id, self.user.id, nick=nickname or '', **kwargs)
def disconnect(self):
"""
Disconnects the member from voice (if they are connected).
"""
self.modify(channel_id=None)
def modify(self, **kwargs):
self.client.api.guilds_members_modify(self.guild.id, self.user.id, **kwargs)

Loading…
Cancel
Save