From 524b044c1a9fc25e5a175b3e58a399c801e6bc10 Mon Sep 17 00:00:00 2001 From: NeloBlivion <41271523+NeloBlivion@users.noreply.github.com> Date: Wed, 18 May 2022 17:47:59 +0100 Subject: [PATCH] Add news attribute to TextChannel Add the `news` attribute to TextChannel which implements `is_news()`, which in turn fixes the base `_TextChannel.__repr__` function. --- discord/channel.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord/channel.py b/discord/channel.py index 2b4b5e957d..092eb3fbdd 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -720,6 +720,10 @@ def is_news(self) -> bool: """:class:`bool`: Checks if the channel is a news/anouncements channel.""" return self._type == ChannelType.news.value + @property + def news(self) -> bool: + return self.is_news() + async def create_thread( self, *,