Add type property to thread channels

This commit is contained in:
Alex Liu 2021-07-01 17:27:39 -07:00 committed by GitHub
parent 30605e6f4f
commit 64b48431b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,6 +191,10 @@ class Thread(Messageable, Hashable):
self._unroll_metadata(data['thread_metadata'])
except KeyError:
pass
@property
def type(self) -> ChannelType:
""":class:`ChannelType`: The channel's Discord type."""
return self._type
@property
def parent(self) -> Optional[TextChannel]: