Publicly expose a type property for all channels.

Fix #2185
This commit is contained in:
Rapptz
2019-06-09 00:23:22 -04:00
parent 991140eebe
commit 7e2da1c93b
3 changed files with 22 additions and 12 deletions

View File

@ -367,7 +367,7 @@ class ConnectionState:
message = Message(channel=channel, data=data, state=self)
self.dispatch('message', message)
self._messages.append(message)
if channel and channel._type in (0, 5):
if channel and channel.__class__ is TextChannel:
channel.last_message_id = message.id
def parse_message_delete(self, data):