Ignore moving category channels to another category
This commit is contained in:
parent
b850c9cd5d
commit
a30ad6acf2
@ -751,6 +751,7 @@ class GuildChannel:
|
|||||||
category: Optional[:class:`abc.Snowflake`]
|
category: Optional[:class:`abc.Snowflake`]
|
||||||
The category to move this channel under.
|
The category to move this channel under.
|
||||||
If ``None`` is given then it moves it out of the category.
|
If ``None`` is given then it moves it out of the category.
|
||||||
|
This parameter is ignored if moving a category channel.
|
||||||
sync_permissions: :class:`bool`
|
sync_permissions: :class:`bool`
|
||||||
Whether to sync the permissions with the category (if given).
|
Whether to sync the permissions with the category (if given).
|
||||||
reason: :class:`str`
|
reason: :class:`str`
|
||||||
|
@ -823,6 +823,11 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
|
|||||||
|
|
||||||
await self._edit(options=options, reason=reason)
|
await self._edit(options=options, reason=reason)
|
||||||
|
|
||||||
|
@utils.copy_doc(discord.abc.GuildChannel.move)
|
||||||
|
async def move(self, **kwargs):
|
||||||
|
kwargs.pop('category', None)
|
||||||
|
await super().move(**kwargs)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def channels(self):
|
def channels(self):
|
||||||
"""List[:class:`abc.GuildChannel`]: Returns the channels that are under this category.
|
"""List[:class:`abc.GuildChannel`]: Returns the channels that are under this category.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user