Fix infinite recursion in TextChannel.type

This commit is contained in:
Rapptz 2022-04-29 10:00:33 -04:00
parent 7ee15e1d68
commit 9e3375f3fc

View File

@ -201,7 +201,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
@property
def type(self) -> Literal[ChannelType.text, ChannelType.news]:
""":class:`ChannelType`: The channel's Discord type."""
if self.type == 0:
if self._type == 0:
return ChannelType.text
return ChannelType.news