aboutsummaryrefslogtreecommitdiff
path: root/discord/channel.py
diff options
context:
space:
mode:
authorCapnS <[email protected]>2019-06-02 13:53:07 -0500
committerRapptz <[email protected]>2019-12-04 18:40:38 -0500
commit072cef3bb61842396c2fc6202ec660a370016079 (patch)
tree65f4067ef2676af425cab32f0a368bf38f1af5e5 /discord/channel.py
parentFix more deprecation warnings for 3.8 (diff)
downloaddiscord.py-072cef3bb61842396c2fc6202ec660a370016079.tar.xz
discord.py-072cef3bb61842396c2fc6202ec660a370016079.zip
Allow editing of overwrites in Channel.edit()
Diffstat (limited to 'discord/channel.py')
-rw-r--r--discord/channel.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/discord/channel.py b/discord/channel.py
index e8e56154..0456a1d3 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -215,11 +215,17 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
A value of `0` disables slowmode. The maximum value possible is `21600`.
reason: Optional[:class:`str`]
The reason for editing this channel. Shows up on the audit log.
+ overwrites: :class:`dict`
+ A :class:`dict` of target (either a role or a member) to
+ :class:`PermissionOverwrite` to apply to the channel.
+
+ .. versionadded:: 1.3.0
Raises
------
InvalidArgument
- If position is less than 0 or greater than the number of channels.
+ If position is less than 0 or greater than the number of channels, or if
+ the permission overwrite information is not in proper form.
Forbidden
You do not have permissions to edit the channel.
HTTPException
@@ -654,9 +660,16 @@ class VoiceChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable):
category.
reason: Optional[:class:`str`]
The reason for editing this channel. Shows up on the audit log.
+ overwrites: :class:`dict`
+ A :class:`dict` of target (either a role or a member) to
+ :class:`PermissionOverwrite` to apply to the channel.
+
+ .. versionadded:: 1.3.0
Raises
------
+ InvalidArgument
+ If the permission overwrite information is not in proper form.
Forbidden
You do not have permissions to edit the channel.
HTTPException
@@ -933,11 +946,17 @@ class StoreChannel(discord.abc.GuildChannel, Hashable):
category.
reason: Optional[:class:`str`]
The reason for editing this channel. Shows up on the audit log.
+ overwrites: :class:`dict`
+ A :class:`dict` of target (either a role or a member) to
+ :class:`PermissionOverwrite` to apply to the channel.
+
+ .. versionadded:: 1.3
Raises
------
InvalidArgument
- If position is less than 0 or greater than the number of channels.
+ If position is less than 0 or greater than the number of channels, or if
+ the permission overwrite information is not in proper form.
Forbidden
You do not have permissions to edit the channel.
HTTPException