aboutsummaryrefslogtreecommitdiff
path: root/discord/state.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-06-09 00:23:22 -0400
committerRapptz <[email protected]>2019-06-09 00:23:22 -0400
commit7e2da1c93b9db02b71e9f7a35c8a09679d97b0bb (patch)
treea420236ece4573b0f449323a0783d786a385b056 /discord/state.py
parentReplace Enum with an internal one for significant speed improvements. (diff)
downloaddiscord.py-7e2da1c93b9db02b71e9f7a35c8a09679d97b0bb.tar.xz
discord.py-7e2da1c93b9db02b71e9f7a35c8a09679d97b0bb.zip
Publicly expose a type property for all channels.
Fix #2185
Diffstat (limited to 'discord/state.py')
-rw-r--r--discord/state.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/state.py b/discord/state.py
index c4b4ea6c..f2ffabb2 100644
--- a/discord/state.py
+++ b/discord/state.py
@@ -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):