diff options
| author | Rapptz <[email protected]> | 2017-01-16 18:19:18 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-01-16 18:19:18 -0500 |
| commit | f4cadaf0ccc291f01434d567acde8909b46f218f (patch) | |
| tree | e7f3d52db1ceda799e3b24fb560c3b935d6d7e32 /discord/abc.py | |
| parent | Fix AutoShardedClient docstring. (diff) | |
| download | discord.py-f4cadaf0ccc291f01434d567acde8909b46f218f.tar.xz discord.py-f4cadaf0ccc291f01434d567acde8909b46f218f.zip | |
Fix bug with GuildChannel.edit and Role.edit with positions.
I did not update the HTTP code for these two methods.
Diffstat (limited to 'discord/abc.py')
| -rw-r--r-- | discord/abc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/abc.py b/discord/abc.py index 2a85d7f2..e8ca3db4 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -124,8 +124,8 @@ class GuildChannel: raise InvalidArgument('Channel position cannot be less than 0.') http = self._state.http - url = '{0}/{1.guild.id}/channels'.format(http.GUILDS, self) - channels = [c for c in self.guild.channels if isinstance(c, type(self))] + cls = type(self) + channels = [c for c in self.guild.channels if isinstance(c, cls)] if position >= len(channels): raise InvalidArgument('Channel position cannot be greater than {}'.format(len(channels) - 1)) @@ -143,7 +143,7 @@ class GuildChannel: channels.insert(position, self) payload = [{'id': c.id, 'position': index } for index, c in enumerate(channels)] - yield from http.patch(url, json=payload, bucket='move_channel') + yield from http.move_channel_position(self.guild.id, payload) def _fill_overwrites(self, data): self._overwrites = [] |