aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/state.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/state.py b/discord/state.py
index cd65ba46..7a8fc466 100644
--- a/discord/state.py
+++ b/discord/state.py
@@ -312,9 +312,9 @@ class ConnectionState:
self.dispatch('channel_update', old_channel, channel)
def parse_channel_create(self, data):
- is_private = data.get('is_private', False)
+ ch_type = try_enum(ChannelType, data.get('type'))
channel = None
- if is_private:
+ if ch_type in (ChannelType.group, ChannelType.private):
channel = PrivateChannel(self.user, **data)
self._add_private_channel(channel)
else: