mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Fix crashing for now when a category is created.
A full implementation will come later.
This commit is contained in:
1 parent
8912625428
commit
1367877d36
2 files changed
+7
-2
No files matched your search
@@ -496,6 +496,10 @@ class ConnectionState:
|
||||
guild_id = utils._get_as_snowflake(data, 'guild_id')
|
||||
guild = self._get_guild(guild_id)
|
||||
if guild is not None:
|
||||
if factory is None:
|
||||
log.warning('CHANNEL_CREATE referencing an unknown channel type %s. Discarding.', data['type'])
|
||||
return
|
||||
|
||||
channel = factory(guild=guild, state=self, data=data)
|
||||
guild._add_channel(channel)
|
||||
self.dispatch('guild_channel_create', channel)
|
||||
|
||||
Reference in new issue
Block a user