diff options
| author | NCPlayz <[email protected]> | 2020-05-18 00:39:22 +0100 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-05-29 23:21:59 -0400 |
| commit | bd1420b5f0b9856d3bb7129a0e4353d6bd570bb0 (patch) | |
| tree | 181c0a1210a9a7cddf2286c28fce1889a6578070 /discord/channel.py | |
| parent | Fix KeyError on Member Channels not in JSON (diff) | |
| download | discord.py-bd1420b5f0b9856d3bb7129a0e4353d6bd570bb0.tar.xz discord.py-bd1420b5f0b9856d3bb7129a0e4353d6bd570bb0.zip | |
Allow editing of channel types for news and text channels
Diffstat (limited to 'discord/channel.py')
| -rw-r--r-- | discord/channel.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/discord/channel.py b/discord/channel.py index 68383b8c..71e5580b 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -197,6 +197,9 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): .. versionchanged:: 1.3 The ``overwrites`` keyword-only parameter was added. + .. versionchanged:: 1.4 + The ``type`` keyword-only parameter was added. + Parameters ---------- name: :class:`str` @@ -216,6 +219,10 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): slowmode_delay: :class:`int` Specifies the slowmode rate limit for user in this channel, in seconds. A value of `0` disables slowmode. The maximum value possible is `21600`. + type: :class:`ChannelType` + Change the type of this text channel. Currently, only conversion between + :attr:`ChannelType.text` and :attr:`ChannelType.news` is supported. This + is only available to guilds that contain ``NEWS`` in :attr:`Guild.features`. reason: Optional[:class:`str`] The reason for editing this channel. Shows up on the audit log. overwrites: :class:`dict` |