From f4cadaf0ccc291f01434d567acde8909b46f218f Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 16 Jan 2017 18:19:18 -0500 Subject: Fix bug with GuildChannel.edit and Role.edit with positions. I did not update the HTTP code for these two methods. --- discord/abc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'discord/abc.py') 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 = [] -- cgit v1.2.3