diff options
| author | Rapptz <[email protected]> | 2019-03-17 14:32:51 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-03-17 14:32:51 -0400 |
| commit | 5061915b2ab032ca0c56fd27fad81dd4bd795679 (patch) | |
| tree | ee809c46b59468e676aaa3f725b65d7edd7ef723 /discord/abc.py | |
| parent | Fix NameError in Embed.to_dict (diff) | |
| download | discord.py-5061915b2ab032ca0c56fd27fad81dd4bd795679.tar.xz discord.py-5061915b2ab032ca0c56fd27fad81dd4bd795679.zip | |
Add support for store channels.
Diffstat (limited to 'discord/abc.py')
| -rw-r--r-- | discord/abc.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/discord/abc.py b/discord/abc.py index 2280bd60..8345786c 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -187,13 +187,17 @@ class GuildChannel: def __str__(self): return self.name + @property + def _sorting_bucket(self): + raise NotImplementedError + async def _move(self, position, parent_id=None, lock_permissions=False, *, reason): if position < 0: raise InvalidArgument('Channel position cannot be less than 0.') http = self._state.http - cls = type(self) - channels = [c for c in self.guild.channels if isinstance(c, cls)] + bucket = self._sorting_bucket + channels = [c for c in self.guild.channels if c._sorting_bucket == bucket] if position >= len(channels): raise InvalidArgument('Channel position cannot be greater than {}'.format(len(channels) - 1)) |