mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
Handle private channel CHANNEL_CREATE better.
This commit is contained in:
parent
e60047b756
commit
c7f99afe7e
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user