diff options
| author | Rapptz <[email protected]> | 2017-09-24 04:55:10 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-09-24 04:55:10 -0400 |
| commit | f86ac47b2853f1331db450af296666b4d3e9802f (patch) | |
| tree | d3fe791b7f0b1743638546f09f0f06f81fe79d0a /discord/abc.py | |
| parent | Temporarily add created channels to cache. (diff) | |
| download | discord.py-f86ac47b2853f1331db450af296666b4d3e9802f.tar.xz discord.py-f86ac47b2853f1331db450af296666b4d3e9802f.zip | |
Don't use Bulk Channel Edit endpoint if not actually moving channels.
Should make the category-only edit cases more straightforward since
it does not rely on other guilds in the cache, outside of the category
itself.
Diffstat (limited to 'discord/abc.py')
| -rw-r--r-- | discord/abc.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/abc.py b/discord/abc.py index e836dda3..83df3fab 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -239,7 +239,10 @@ class GuildChannel: position = options.pop('position') except KeyError: if parent_id is not _undefined: - yield from self._move(self.position, parent_id=parent_id, lock_permissions=lock_permissions, reason=reason) + if lock_permissions: + category = self.guild.get_channel(parent_id) + options['permission_overwrites'] = [c._asdict() for c in category._overwrites] + options['parent_id'] = parent_id elif lock_permissions and self.category_id is not None: # if we're syncing permissions on a pre-existing channel category without changing it # we need to update the permissions to point to the pre-existing category |