aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve C <[email protected]>2020-05-10 01:20:04 -0400
committerRapptz <[email protected]>2020-05-10 17:00:24 -0400
commit128c9f4eb8048713ba5c6cf0dfc768a5b8473c60 (patch)
tree81fd4ac0d98fc93787227e45b5a5f86c40dd7042
parent[tasks] Allow Loop.cancel in Loop.before_loop (diff)
downloaddiscord.py-128c9f4eb8048713ba5c6cf0dfc768a5b8473c60.tar.xz
discord.py-128c9f4eb8048713ba5c6cf0dfc768a5b8473c60.zip
Use GuildChannel abc for CategoryChannel edit
I noticed nothing happened when I did `ch.edit(overwrites=oh.overwrites)` `http.edit_channel` doesn't do anything with the `overwrites` keyword, it's processed as `permission_overwrites` instead which `self._edit` takes care of. I feel this was an oversight at some point.
-rw-r--r--discord/channel.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 1879a974..68383b8c 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -791,17 +791,7 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
Editing the category failed.
"""
- try:
- position = options.pop('position')
- except KeyError:
- pass
- else:
- await self._move(position, reason=reason)
- self.position = position
-
- if options:
- data = await self._state.http.edit_channel(self.id, reason=reason, **options)
- self._update(self.guild, data)
+ await self._edit(options=options, reason=reason)
@property
def channels(self):