mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-17 11:19:00 +00:00
Add support for voice kicking.
This commit is contained in:
parent
40cac30da1
commit
4dee175d2a
@ -469,18 +469,22 @@ class Member(discord.abc.Messageable, _BaseUser):
|
|||||||
|
|
||||||
All parameters are optional.
|
All parameters are optional.
|
||||||
|
|
||||||
|
.. versionchanged:: 1.1.0
|
||||||
|
Can now pass ``None`` to ``voice_channel`` to kick a member from voice.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
-----------
|
-----------
|
||||||
nick: Optional[:class:`str`]
|
nick: Optional[:class:`str`]
|
||||||
The member's new nickname. Use ``None`` to remove the nickname.
|
The member's new nickname. Use ``None`` to remove the nickname.
|
||||||
mute: Optional[:class:`bool`]
|
mute: :class:`bool`
|
||||||
Indicates if the member should be guild muted or un-muted.
|
Indicates if the member should be guild muted or un-muted.
|
||||||
deafen: Optional[:class:`bool`]
|
deafen: :class:`bool`
|
||||||
Indicates if the member should be guild deafened or un-deafened.
|
Indicates if the member should be guild deafened or un-deafened.
|
||||||
roles: Optional[List[:class:`Roles`]]
|
roles: List[:class:`Roles`]
|
||||||
The member's new list of roles. This *replaces* the roles.
|
The member's new list of roles. This *replaces* the roles.
|
||||||
voice_channel: Optional[:class:`VoiceChannel`]
|
voice_channel: Optional[:class:`VoiceChannel`]
|
||||||
The voice channel to move the member to.
|
The voice channel to move the member to.
|
||||||
|
Pass ``None`` to kick them from voice.
|
||||||
reason: Optional[:class:`str`]
|
reason: Optional[:class:`str`]
|
||||||
The reason for editing this member. Shows up on the audit log.
|
The reason for editing this member. Shows up on the audit log.
|
||||||
|
|
||||||
@ -520,7 +524,7 @@ class Member(discord.abc.Messageable, _BaseUser):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
payload['channel_id'] = vc.id
|
payload['channel_id'] = vc and vc.id
|
||||||
|
|
||||||
try:
|
try:
|
||||||
roles = fields['roles']
|
roles = fields['roles']
|
||||||
@ -543,10 +547,14 @@ class Member(discord.abc.Messageable, _BaseUser):
|
|||||||
|
|
||||||
This raises the same exceptions as :meth:`edit`.
|
This raises the same exceptions as :meth:`edit`.
|
||||||
|
|
||||||
|
.. versionchanged:: 1.1.0
|
||||||
|
Can now pass ``None`` to kick a member from voice.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
-----------
|
-----------
|
||||||
channel: :class:`VoiceChannel`
|
channel: Optional[:class:`VoiceChannel`]
|
||||||
The new voice channel to move the member to.
|
The new voice channel to move the member to.
|
||||||
|
Pass ``None`` to kick them from voice.
|
||||||
reason: Optional[:class:`str`]
|
reason: Optional[:class:`str`]
|
||||||
The reason for doing this action. Shows up on the audit log.
|
The reason for doing this action. Shows up on the audit log.
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user