aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLilly Rose Berner <[email protected]>2021-06-28 06:00:51 +0200
committerGitHub <[email protected]>2021-06-28 00:00:51 -0400
commitb59ec318c0516a9a96412d9ab07e86dbd794e93e (patch)
tree22824fe727235bc27e015fb0dfd08d860e04f042
parentLocalize Embed.timestamp during assignment (diff)
downloaddiscord.py-b59ec318c0516a9a96412d9ab07e86dbd794e93e.tar.xz
discord.py-b59ec318c0516a9a96412d9ab07e86dbd794e93e.zip
Fix Category.create_x_channel raising without overwrites
-rw-r--r--discord/channel.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/discord/channel.py b/discord/channel.py
index b7f57146..729f7f4d 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -1383,7 +1383,7 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
ret.sort(key=lambda c: (c.position, c.id))
return ret
- async def create_text_channel(self, name, *, overwrites=None, reason=None, **options):
+ async def create_text_channel(self, name, **options):
"""|coro|
A shortcut method to :meth:`Guild.create_text_channel` to create a :class:`TextChannel` in the category.
@@ -1393,9 +1393,9 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
:class:`TextChannel`
The channel that was just created.
"""
- return await self.guild.create_text_channel(name, overwrites=overwrites, category=self, reason=reason, **options)
+ return await self.guild.create_text_channel(name, category=self, **options)
- async def create_voice_channel(self, name, *, overwrites=None, reason=None, **options):
+ async def create_voice_channel(self, name, **options):
"""|coro|
A shortcut method to :meth:`Guild.create_voice_channel` to create a :class:`VoiceChannel` in the category.
@@ -1405,9 +1405,9 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
:class:`VoiceChannel`
The channel that was just created.
"""
- return await self.guild.create_voice_channel(name, overwrites=overwrites, category=self, reason=reason, **options)
+ return await self.guild.create_voice_channel(name, category=self, **options)
- async def create_stage_channel(self, name, *, overwrites=None, reason=None, **options):
+ async def create_stage_channel(self, name, **options):
"""|coro|
A shortcut method to :meth:`Guild.create_stage_channel` to create a :class:`StageChannel` in the category.
@@ -1419,7 +1419,7 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
:class:`StageChannel`
The channel that was just created.
"""
- return await self.guild.create_stage_channel(name, overwrites=overwrites, category=self, reason=reason, **options)
+ return await self.guild.create_stage_channel(name, category=self, **options)
class StoreChannel(discord.abc.GuildChannel, Hashable):
"""Represents a Discord guild store channel.